PreStartCallEvent
The PreStartCallEvent
is a custom event in the MelodyMine plugin. It is triggered before a call is started between two players. This event provides the ability to interact with the call process, allowing developers to add custom logic or modify the behavior of the call initiation process.
Event Details
melodyPlayer
MelodyPlayer
The player who is initiating the call.
targetPlayer
MelodyPlayer
The player who is the target of the call.
canSendMessage
boolean
A flag indicating whether a message can be sent to the players involved in the call.
isCancelled
boolean
A flag indicating whether the event is cancelled. If true, the call will not be initiated.
Example Usage
Here is an example of how to listen to this event using the Bukkit event API:
In this example, we're listening for the PreStartCallEvent
. When the event is triggered, we're logging the names of the players involved in the call to the console. We also check if a message can be sent during this event. If the event is cancelled, the call will not be initiated.
Remember to register your event listener in your plugin's onEnable()
method to ensure that it is active.
Last updated