Package valorless.havenbags
Class EventListener
java.lang.Object
valorless.havenbags.EventListener
- All Implemented Interfaces:
org.bukkit.event.Listener
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidinit()voidonFeatureGUI(org.bukkit.event.inventory.InventoryClickEvent event) Handles inventory click events to open the features GUI when the configured item is clicked.voidonPlayerJoin(org.bukkit.event.player.PlayerJoinEvent event) voidonUpgradeGUI(org.bukkit.event.player.PlayerInteractEvent event)
-
Field Details
-
upgradeBlock
public static org.bukkit.Material upgradeBlock
-
-
Constructor Details
-
EventListener
public EventListener()
-
-
Method Details
-
init
public static void init() -
onPlayerJoin
public void onPlayerJoin(org.bukkit.event.player.PlayerJoinEvent event) -
onUpgradeGUI
public void onUpgradeGUI(org.bukkit.event.player.PlayerInteractEvent event) -
onFeatureGUI
public void onFeatureGUI(org.bukkit.event.inventory.InventoryClickEvent event) Handles inventory click events to open the features GUI when the configured item is clicked.Checks if the features GUI is enabled in the config, and if the clicked item matches the configured "opens-by" item. If both conditions are met, cancels the event and opens the FeaturesGUI for the player.
- Parameters:
event- The InventoryClickEvent triggered when a player clicks in their inventory
-