Class ExampleMenu

java.lang.Object
net.jeqo.bloons.gui.GUI
net.jeqo.bloons.gui.menus.ExampleMenu

public class ExampleMenu extends GUI
An example of a menu made with the custom GUI system
  • Constructor Details

    • ExampleMenu

      public ExampleMenu()
  • Method Details

    • inventory

      public org.bukkit.inventory.Inventory inventory()
      The inventory that is displayed to the player
      Specified by:
      inventory in class GUI
      Returns:
      The inventory, type org.bukkit.inventory.Inventory
    • name

      public net.kyori.adventure.text.Component name()
      The name that is displayed as the GUI title
      Specified by:
      name in class GUI
      Returns:
      The name, type net.kyori.adventure.text.Component
    • slots

      public int slots()
      The number of slots that are present within the GUI It should be a multiple of 9. 27 and 54 are common values.
      Specified by:
      slots in class GUI
      Returns:
      The number of slots contained within the GUI, type int
    • fillerItem

      public GUIClickableItem fillerItem(int slot)
      The filler item that is used to fill empty slots in the GUI
      Specified by:
      fillerItem in class GUI
      Parameters:
      slot - The slot that the item is in, type int
      Returns:
      The filler item, type net.jeqo.bloons.gui.GUIClickableItem
    • borderItem

      public GUIClickableItem borderItem(int slot)
      The border item that is used to create a border around the GUI
      Specified by:
      borderItem in class GUI
      Parameters:
      slot - The slot of the item in the inventory, type int
      Returns:
      The border item, type net.jeqo.bloons.gui.GUIClickableItem
    • cantPickup

      public GUIClickableItem cantPickup(NBTItem currentItem, int slot)
      Creates a clickable item that can't be picked up with the click event cancelled
      Specified by:
      cantPickup in class GUI
      Parameters:
      currentItem - The item that is being clicked on
      slot - The slot that the item is in
      Returns:
      A GUIClickableItem object that represents the item that can't be picked up, type net.jeqo.bloons.gui.GUIClickableItem
    • onClose

      public void onClose(org.bukkit.entity.Player player)
      Determines what happens when the GUI is closed
      Specified by:
      onClose in class GUI
      Parameters:
      player - The player that closed the GUI, type org.bukkit.entity.Player
    • open

      public void open(org.bukkit.entity.Player player)
      Determines what happens when the GUI is opened
      Specified by:
      open in class GUI
      Parameters:
      player - The player that opened the GUI, type org.bukkit.entity.Player
    • update

      public void update()
      Determines what happens when the GUI is updated (this happens every 20 ticks)
      Specified by:
      update in class GUI