PreRenewDataEvent
The PreRenewDataEvent
is a custom event in the MelodyMine plugin. It is triggered before the renewal of data in the client. This event is cancellable, which means you can prevent the data renewal process from happening if certain conditions are met in your plugin.
Class Structure
data
RenewData
An instance of the RenewData
class which contains the data to be renewed.
isCancelled()
boolean
Checks if the event is cancelled.
setCancelled(boolean)
void
Sets the cancellation state of the event.
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 PreRenewDataEvent
. When the event is triggered, we're logging the RenewData
instance to the console. If the size of the p
list in the RenewData
instance is greater than 10, 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