Package net.jeqo.bloons.gui.menus
Class ExampleMenu
java.lang.Object
net.jeqo.bloons.gui.GUI
net.jeqo.bloons.gui.menus.ExampleMenu
An example of a menu made with the custom GUI system
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionborderItem
(int slot) The border item that is used to create a border around the GUIcantPickup
(NBTItem currentItem, int slot) Creates a clickable item that can't be picked up with the click event cancelledfillerItem
(int slot) The filler item that is used to fill empty slots in the GUIorg.bukkit.inventory.Inventory
The inventory that is displayed to the playernet.kyori.adventure.text.Component
name()
The name that is displayed as the GUI titlevoid
onClose
(org.bukkit.entity.Player player) Determines what happens when the GUI is closedvoid
open
(org.bukkit.entity.Player player) Determines what happens when the GUI is openedint
slots()
The number of slots that are present within the GUI It should be a multiple of 9.void
update()
Determines what happens when the GUI is updated (this happens every 20 ticks)Methods inherited from class net.jeqo.bloons.gui.GUI
addItem, addItem, fillAllSlots, fillEmptySlots, getItem, setBorder, startUpdater, stopUpdater, triggerEvent
-
Constructor Details
-
ExampleMenu
public ExampleMenu()
-
-
Method Details
-
inventory
public org.bukkit.inventory.Inventory inventory()The inventory that is displayed to the player -
name
public net.kyori.adventure.text.Component name()The name that is displayed as the GUI title -
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. -
fillerItem
The filler item that is used to fill empty slots in the GUI- Specified by:
fillerItem
in classGUI
- Parameters:
slot
- The slot that the item is in, type int- Returns:
- The filler item, type net.jeqo.bloons.gui.GUIClickableItem
-
borderItem
The border item that is used to create a border around the GUI- Specified by:
borderItem
in classGUI
- Parameters:
slot
- The slot of the item in the inventory, type int- Returns:
- The border item, type net.jeqo.bloons.gui.GUIClickableItem
-
cantPickup
Creates a clickable item that can't be picked up with the click event cancelled- Specified by:
cantPickup
in classGUI
- Parameters:
currentItem
- The item that is being clicked onslot
- 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 -
open
public void open(org.bukkit.entity.Player player) Determines what happens when the GUI is opened -
update
public void update()Determines what happens when the GUI is updated (this happens every 20 ticks)
-