PreDenyCallEvent
The PreDenyCallEvent
is a custom event in the Bukkit API that is called before a call is denied in the MelodyMine plugin. This event provides information about the player who is denying the call (melodyPlayer
) and the target player whose call is being denied (targetPlayer
).
Event Details
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