Class ButtonData

java.lang.Object
me.tayebyassine.homestead.gui.helpers.ButtonData

public final class ButtonData extends Object
Holds the raw data for a single menu button: display name, lore lines, and item type.

Instances are created by MenuButtons and consumed by MenuItems to produce the final ItemStack.

  • Constructor Details

    • ButtonData

      public ButtonData(String name, List<String> lore, String type)
      Creates a new button data instance.
      Parameters:
      name - the display name
      lore - the lore lines
      type - the raw material type string (e.g. DIAMOND, PLAYERHEAD-...)
  • Method Details

    • getName

      public String getName()
      Returns the display name.
    • getLore

      public List<String> getLore()
      Returns the lore lines.
    • getOriginalType

      public String getOriginalType()
      Returns the raw type string as defined in the YAML.
    • setOriginalType

      public void setOriginalType(String type)
      Overrides the original type string and re-resolves the Material.
      Parameters:
      type - the new raw material type string
    • getType

      public org.bukkit.Material getType()
      Returns the resolved Material, or Material.BARRIER if unresolvable.