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 classGuiInventory.BorderColor -
Field Summary
Fields Modifier and Type Field Description protected java.util.List<GuiActionButton>actionButtonsprotected org.bukkit.inventory.Inventoryinventoryprotected static intINVENTORY_SIZEprotected PPlayerpplayer -
Constructor Summary
Constructors Constructor Description GuiInventory(PPlayer pplayer, org.bukkit.inventory.Inventory inventory) -
Method Summary
Modifier and Type Method Description voidclose()protected voidfillBorder(GuiInventory.BorderColor borderColor)Fills the border of the inventory with a given colororg.bukkit.inventory.InventorygetInventory()Gets the Inventory this GuiInventory is managingPPlayergetPPlayer()Gets the PPlayer this GuiInventory is managingvoidonClick(org.bukkit.event.inventory.InventoryClickEvent event)Handles clicks of GuiActionButtonsvoidonTick()Ticked at an interval to animate GuiActionButton iconsprotected voidpopulate()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()
-