PreDisableAdminModeEvent
The PreDisableAdminModeEvent
is a custom event in the Bukkit API that is called before an admin mode is disabled for a MelodyPlayer
.
This event is cancellable, which means you can prevent the admin mode from being disabled by cancelling this event in your event handler.
Event Details
melodyPlayer
The MelodyPlayer
instance for which the admin mode is about to be disabled.
Example
Here is an example of how to listen to this event and use its properties:
In this example, we're listening for the PreDisableAdminModeEvent
. If the event is cancellable, we cancel it and log a message to the console.
Remember to register your event listener in your plugin's onEnable()
method to ensure that your event handler is called when the event is fired.
This will ensure that your MyListener
class is listening for events.
Last updated