PreEnableAdminModeEvent
Event Details
Property
Description
melodyPlayer
The MelodyPlayer
instance representing the player for whom the admin mode is about to be enabled.
Example Usage
Here is an example of how to listen to this event in a Bukkit plugin:
In this example, we're listening for the PreEnableAdminModeEvent
. When the event is triggered, we log the name of the player for whom the admin mode is about to be enabled. If the player's name is "NotAdmin", we cancel the event to prevent the admin mode from being enabled for this player.
Remember to register your event listener in your plugin's onEnable()
method to ensure that your plugin listens for the PreEnableAdminModeEvent
.
Last updated