PreDenyCallEvent
Event Details
Attribute
Description
melodyPlayer
The player who is denying the call.
targetPlayer
The player whose call is being denied.
Example Usage
Here is an example of how to listen to this event using the Bukkit event API:
In this example, when a player denies a call, a message is logged in the console indicating who is denying the call and from whom the call is being denied. If the event is cancellable, you can cancel it based on some condition. Similarly, if the event has a canSendMessage
method, you can prevent the message from being sent.
Remember to register your event listener in the onEnable
method of your main plugin class.
This will ensure that your listener is active and can respond to the PreDenyCallEvent
.
Last updated