Package com.ranull.graves.listener
Class InventoryOpenListener
java.lang.Object
com.ranull.graves.listener.InventoryOpenListener
- All Implemented Interfaces:
org.bukkit.event.Listener
Listener for handling InventoryOpenEvent to manage interactions with grave inventories.
-
Constructor Summary
ConstructorsConstructorDescriptionInventoryOpenListener
(Graves plugin) Constructs an InventoryOpenListener with the specified Graves plugin. -
Method Summary
Modifier and TypeMethodDescriptionvoid
onInventoryOpen
(org.bukkit.event.inventory.InventoryOpenEvent event) Handles the InventoryOpenEvent to manage interactions with grave inventories.
-
Constructor Details
-
InventoryOpenListener
Constructs an InventoryOpenListener with the specified Graves plugin.- Parameters:
plugin
- The Graves plugin instance.
-
-
Method Details
-
onInventoryOpen
public void onInventoryOpen(org.bukkit.event.inventory.InventoryOpenEvent event) Handles the InventoryOpenEvent to manage interactions with grave inventories. Creates and triggers a GraveOpenEvent when a Grave inventory is opened, and cancels the open event if the GraveOpenEvent is cancelled.- Parameters:
event
- The InventoryOpenEvent to handle.
-