Class GuiPageElement


public class GuiPageElement extends StaticGuiElement
This is an element that allows for controlling the pagination of the gui. Untested und potentially unfinished.
  • Constructor Details

    • GuiPageElement

      public GuiPageElement(char slotChar, org.bukkit.inventory.ItemStack item, GuiPageElement.PageAction pageAction, String... text)
      An element that allows for controlling the pagination of the gui.
      Parameters:
      slotChar - The character to replace in the gui setup string
      item - The ItemStack representing this element
      pageAction - What kind of page action you want to happen when interacting with the element.
      text - The text to display on this element, placeholders are automatically replaced, see InventoryGui.replaceVars(org.bukkit.entity.HumanEntity, java.lang.String, java.lang.String...) for a list of the placeholder variables. Empty text strings are also filter out, use a single space if you want to add an empty line!
      If it's not set/empty the item's default name will be used
  • Method Details

    • isSilent

      public boolean isSilent()
      Get whether or not this element should make a sound when interacted with
      Returns:
      Whether or not to make a sound when interacted with
    • setSilent

      public void setSilent(boolean silent)
      Set whether or not this element should make a sound when interacted with
      Parameters:
      silent - Whether or not to make a sound when interacted with
    • getItem

      public org.bukkit.inventory.ItemStack getItem(org.bukkit.entity.HumanEntity who, int slot)
      Description copied from class: GuiElement
      Get the item that is displayed by this element on a certain page
      Overrides:
      getItem in class StaticGuiElement
      Parameters:
      who - The player who views the page
      slot - The slot to get the item for
      Returns:
      The ItemStack that is displayed as this element