Package valorless.havenbags.events
Class BagDeleteEvent
java.lang.Object
org.bukkit.event.Event
valorless.havenbags.events.BagDeleteEvent
public class BagDeleteEvent
extends org.bukkit.event.Event
Called when a HavenBag is deleted.
This event provides access to the Player
responsible for the deletion
(if applicable) and the Data
object associated with the bag.
Use this event to handle cleanup, saving, or applying custom logic when a bag is permanently removed.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Constructor Summary
ConstructorsConstructorDescriptionBagDeleteEvent
(org.bukkit.entity.Player player, Data bagData) Constructs a new BagDeleteEvent. -
Method Summary
Modifier and TypeMethodDescriptionGets theData
associated with the deleted bag.static org.bukkit.event.HandlerList
Required boilerplate: returns the static HandlerList for this event type.org.bukkit.event.HandlerList
Required boilerplate: returns the list of handlers listening to this event.org.bukkit.entity.Player
Gets the player who deleted the bag.Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
BagDeleteEvent
Constructs a new BagDeleteEvent.- Parameters:
player
- The player who deleted the bagbagData
- The bag's associatedData
-
-
Method Details
-
getHandlers
public org.bukkit.event.HandlerList getHandlers()Required boilerplate: returns the list of handlers listening to this event.- Specified by:
getHandlers
in classorg.bukkit.event.Event
- Returns:
- HandlerList for BagDeleteEvent
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList()Required boilerplate: returns the static HandlerList for this event type.- Returns:
- HandlerList for BagDeleteEvent
-
getPlayer
public org.bukkit.entity.Player getPlayer()Gets the player who deleted the bag.- Returns:
- The player
-
getBagData
Gets theData
associated with the deleted bag.- Returns:
- The bag data
-