Package dev.esophose.playerparticles.gui
Class GuiInventory
java.lang.Object
dev.esophose.playerparticles.gui.GuiInventory
- Direct Known Subclasses:
GuiInventoryDefault
,GuiInventoryEditData
,GuiInventoryEditEffect
,GuiInventoryEditParticle
,GuiInventoryEditStyle
,GuiInventoryLoadPresetGroups
,GuiInventoryManageGroups
,GuiInventoryManageParticles
public abstract class GuiInventory
extends java.lang.Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GuiInventory.BorderColor
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<GuiActionButton>
actionButtons
protected org.bukkit.inventory.Inventory
inventory
protected static int
INVENTORY_SIZE
protected PPlayer
pplayer
-
Constructor Summary
Constructors Constructor Description GuiInventory(PPlayer pplayer, org.bukkit.inventory.Inventory inventory)
-
Method Summary
Modifier and Type Method Description void
close()
protected void
fillBorder(GuiInventory.BorderColor borderColor)
Fills the border of the inventory with a given colororg.bukkit.inventory.Inventory
getInventory()
Gets the Inventory this GuiInventory is managingPPlayer
getPPlayer()
Gets the PPlayer this GuiInventory is managingvoid
onClick(org.bukkit.event.inventory.InventoryClickEvent event)
Handles clicks of GuiActionButtonsvoid
onTick()
Ticked at an interval to animate GuiActionButton iconsprotected void
populate()
Populates the Inventory with the contents of actionButtons
-
Field Details
-
INVENTORY_SIZE
protected static final int INVENTORY_SIZE- See Also:
- Constant Field Values
-
pplayer
-
inventory
protected org.bukkit.inventory.Inventory inventory -
actionButtons
-
-
Constructor Details
-
Method Details
-
getPPlayer
Gets the PPlayer this GuiInventory is managing- Returns:
- The PPlayer this GuiInventory is managing
-
getInventory
public org.bukkit.inventory.Inventory getInventory()Gets the Inventory this GuiInventory is managing- Returns:
- The Inventory this GuiInventory is managing
-
fillBorder
Fills the border of the inventory with a given color- Parameters:
borderColor
- The color of the border
-
populate
protected void populate()Populates the Inventory with the contents of actionButtons -
onTick
public void onTick()Ticked at an interval to animate GuiActionButton icons -
onClick
public void onClick(org.bukkit.event.inventory.InventoryClickEvent event)Handles clicks of GuiActionButtons- Parameters:
event
- The InventoryClickEvent triggered when the player clicks in a GuiInventory
-
close
public void close()
-