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

    Constructors
    Constructor
    Description
    BagDeleteEvent(org.bukkit.entity.Player player, Data bagData)
    Constructs a new BagDeleteEvent.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the Data 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BagDeleteEvent

      public BagDeleteEvent(org.bukkit.entity.Player player, Data bagData)
      Constructs a new BagDeleteEvent.
      Parameters:
      player - The player who deleted the bag
      bagData - The bag's associated Data
  • Method Details

    • getHandlers

      public org.bukkit.event.HandlerList getHandlers()
      Required boilerplate: returns the list of handlers listening to this event.
      Specified by:
      getHandlers in class org.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

      public Data getBagData()
      Gets the Data associated with the deleted bag.
      Returns:
      The bag data