Class EventListener

java.lang.Object
valorless.havenbags.EventListener
All Implemented Interfaces:
org.bukkit.event.Listener

public class EventListener extends Object implements org.bukkit.event.Listener
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static org.bukkit.Material
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
     
    void
    onFeatureGUI(org.bukkit.event.inventory.InventoryClickEvent event)
    Handles inventory click events to open the features GUI when the configured item is clicked.
    void
    onPlayerJoin(org.bukkit.event.player.PlayerJoinEvent event)
     
    void
    onUpgradeGUI(org.bukkit.event.player.PlayerInteractEvent event)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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