Class GuiStateElement.State

java.lang.Object
de.themoep.inventorygui.GuiStateElement.State
Enclosing class:
GuiStateElement

public static class GuiStateElement.State extends Object
A state that the GuiStateElement can have.
  • Constructor Details

  • Method Details

    • setText

      public void setText(String... text)
      Set this element's display text. If this is an empty array the item's name will be displayed
      Parameters:
      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 filtered 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
    • getItem

      @Deprecated public org.bukkit.inventory.ItemStack getItem()
      Deprecated.
      Get the ItemStack that represents this state.
      Returns:
      The ItemStack that represents this state
    • getItem

      public org.bukkit.inventory.ItemStack getItem(org.bukkit.entity.HumanEntity who)
      Get the ItemStack that represents this state.
      Parameters:
      who - The player viewing the GUI
      Returns:
      The ItemStack that represents this state
    • getKey

      public String getKey()
      Get the string key of the state.
      Returns:
      The state's string key
    • getText

      public String[] getText()
      Get the text lines that describe this state.
      Returns:
      The text lines for this state