Class GUIDisplay

java.lang.Object
me.hsgamer.hscore.ui.BaseDisplay<GUIHolder>
me.hsgamer.hscore.bukkit.gui.GUIDisplay
All Implemented Interfaces:
Display, Initializable, Updatable, org.bukkit.inventory.InventoryHolder

public class GUIDisplay extends BaseDisplay<GUIHolder> implements org.bukkit.inventory.InventoryHolder
The base Display for UI in Bukkit
  • Constructor Details

    • GUIDisplay

      public GUIDisplay(UUID uuid, GUIHolder holder)
      Create a new display
      Parameters:
      uuid - the unique id
      holder - the holder
  • Method Details

    • isForceUpdate

      public boolean isForceUpdate()
      Should the display force the viewers to update their inventory
      Returns:
      true if it should
    • setForceUpdate

      public GUIDisplay setForceUpdate(boolean forceUpdate)
      Should the display force the viewers to update their inventory
      Parameters:
      forceUpdate - true to force them
      Returns:
      this for builder chain
    • handleClickEvent

      public void handleClickEvent(UUID uuid, org.bukkit.event.inventory.InventoryClickEvent event)
      Handle the click event
      Parameters:
      uuid - the unique id
      event - the click event
    • open

      public void open(org.bukkit.entity.Player player)
      Open the display for the player
      Parameters:
      player - the player
    • open

      public void open()
      Open the display for the owner of this display
    • init

      public void init()
      Specified by:
      init in interface Initializable
    • stop

      public void stop()
      Specified by:
      stop in interface Initializable
    • getInventory

      public org.bukkit.inventory.Inventory getInventory()
      Specified by:
      getInventory in interface org.bukkit.inventory.InventoryHolder
    • update

      public void update()
      Specified by:
      update in interface Updatable