PrePlayerMuteEvent
The PrePlayerMuteEvent
is a custom event in the Bukkit API that is called before a player is muted in the MelodyMine plugin. This event is cancellable, which means you can prevent the player from being muted based on your custom conditions.
Class Structure
Method/Variable | Type | Description |
---|---|---|
|
| The player who is about to be muted. |
|
| Determines whether the event should be cancelled or not. |
Example
Here is an example of how to listen to this event:
In this example, we're listening for the PrePlayerMuteEvent
. When the event is triggered, we log the name of the player who is about to be muted. If the player's name is "TAHER7", we cancel the event and log a message to the console.
Remember to register your event listener in your plugin's onEnable
method for the event to be properly handled.
Last updated