Class SimpleButtonMap

java.lang.Object
me.hsgamer.hscore.minecraft.gui.simple.SimpleButtonMap
All Implemented Interfaces:
ButtonMap, Initializable

public class SimpleButtonMap extends Object implements ButtonMap
A simple ButtonMap with a list of Buttons
  • Constructor Details

    • SimpleButtonMap

      public SimpleButtonMap()
  • Method Details

    • setButton

      public void setButton(int slot, @NotNull @NotNull Button button)
      Set the button
      Parameters:
      slot - the slot
      button - the button
    • removeButton

      public void removeButton(int slot)
      Remove the button
      Parameters:
      slot - the slot
    • removeAllButton

      @NotNull public @NotNull Collection<Button> removeAllButton()
      Remove all buttons
      Returns:
      all cleared buttons
    • getButtons

      @NotNull public @NotNull Collection<Button> getButtons(int slot)
      Get buttons by the slot
      Parameters:
      slot - the slot
      Returns:
      the button
    • getButtonSlotMap

      public Map<Button,Collection<Integer>> getButtonSlotMap()
      Get the map of buttons
      Returns:
      the map of buttons
    • getDefaultButton

      @NotNull public @NotNull Button getDefaultButton()
      Get the default button
      Returns:
      the button
    • setDefaultButton

      public void setDefaultButton(@NotNull @NotNull Button defaultButton)
      Set the default button
      Parameters:
      defaultButton - the button
    • stop

      public void stop()
      Description copied from interface: Initializable
      Stop the object
      Specified by:
      stop in interface Initializable
    • getButtons

      @NotNull public @NotNull Map<@NotNull Integer,@NotNull DisplayButton> getButtons(@NotNull @NotNull UUID uuid, InventorySize inventorySize)
      Description copied from interface: ButtonMap
      Get the button map that is ready to be displayed to the unique id
      Specified by:
      getButtons in interface ButtonMap
      Parameters:
      uuid - the unique id
      inventorySize - the size of the inventory
      Returns:
      the button map