PreEndCallEvent
The PreEndCallEvent
is a custom event in the Bukkit API that is called before a call between two players is ended. This event is cancellable, which means you can prevent the call from ending based on your custom logic. It also allows you to control whether a message is sent to the players involved in the call.
Class Structure
melodyPlayer
MelodyPlayer
The player who is in the call that is about to end.
targetPlayer
MelodyPlayer
The other player involved in the call.
isCancelled()
boolean
Checks if the event is cancelled.
setCancelled(boolean)
void
Sets the cancellation state of the event.
canSendMessage
boolean
Determines whether a message can be sent to the players involved in the call.
Example Usage
Here is an example of how to listen to this event using the Bukkit event API:
Remember to register your event listener in your plugin's onEnable()
method for it to work.
Last updated