Package dev.majek.pc.gui
Class Gui
- java.lang.Object
-
- dev.majek.pc.gui.Gui
-
- Direct Known Subclasses:
GuiInParty,GuiJoinParty,GuiManagePlayer,GuiMembers,GuiNoParty
public abstract class Gui extends Object
Used for constructing GUIs for a player to see and interact with.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidaddActionItem(int slot, org.bukkit.inventory.ItemStack stack, Runnable action)protected voidaddActionItem(int slot, org.bukkit.inventory.ItemStack stack, Runnable action, boolean rightClickOnly)protected voidaddActionItem(int slot, org.bukkit.inventory.ItemStack stack, String name, Runnable action, String... lore)protected voidaddActionItem(int slot, org.bukkit.Material material, String name, Runnable action, boolean rightClickOnly, String... lore)protected voidaddActionItem(int slot, org.bukkit.Material material, String name, Runnable action, String... lore)protected voidaddLabel(int slot, org.bukkit.inventory.ItemStack item)protected voidaddLabel(int slot, org.bukkit.inventory.ItemStack stack, String name, String... lore)protected voidaddLabel(int slot, org.bukkit.Material material, String name, String... lore)protected static org.bukkit.inventory.ItemStackclone(org.bukkit.inventory.ItemStack stack)static StringgetConfigString(String path)org.bukkit.inventory.InventorygetInventory()@Nullable org.bukkit.inventory.ItemStackgetItemStack(GuiToggle guiToggle)GuiHandlerhandler()booleanmatches(org.bukkit.event.inventory.InventoryEvent event)protected voidnewInventory(int size, String displayName)protected voidonClose()voidonInventoryClosed()voidonItemClick(org.bukkit.event.inventory.InventoryClickEvent event)voidopenGui(org.bukkit.entity.Player player)protected abstract voidpopulateInventory(org.bukkit.entity.Player p)protected voidrefreshInventory()protected voidsetDisplayName(int slot, String name)protected voidsetItem(int slot, org.bukkit.inventory.ItemStack stack, String name, String... lore)protected voidsetItem(int slot, org.bukkit.Material material, String name, String... lore)protected voidsetLore(int slot, String... lore)
-
-
-
Method Detail
-
getInventory
public org.bukkit.inventory.Inventory getInventory()
-
matches
public boolean matches(org.bukkit.event.inventory.InventoryEvent event)
-
populateInventory
protected abstract void populateInventory(org.bukkit.entity.Player p)
-
openGui
public void openGui(org.bukkit.entity.Player player)
-
setItem
protected void setItem(int slot, org.bukkit.Material material, String name, String... lore)
-
setItem
protected void setItem(int slot, org.bukkit.inventory.ItemStack stack, String name, String... lore)
-
setDisplayName
protected void setDisplayName(int slot, String name)
-
setLore
protected void setLore(int slot, String... lore)
-
addActionItem
protected void addActionItem(int slot, org.bukkit.Material material, String name, Runnable action, boolean rightClickOnly, String... lore)
-
addActionItem
protected void addActionItem(int slot, org.bukkit.Material material, String name, Runnable action, String... lore)
-
addActionItem
protected void addActionItem(int slot, org.bukkit.inventory.ItemStack stack, String name, Runnable action, String... lore)
-
addLabel
protected void addLabel(int slot, org.bukkit.Material material, String name, String... lore)
-
addLabel
protected void addLabel(int slot, org.bukkit.inventory.ItemStack stack, String name, String... lore)
-
addLabel
protected void addLabel(int slot, org.bukkit.inventory.ItemStack item)
-
addActionItem
protected void addActionItem(int slot, org.bukkit.inventory.ItemStack stack, Runnable action, boolean rightClickOnly)
-
addActionItem
protected void addActionItem(int slot, org.bukkit.inventory.ItemStack stack, Runnable action)
-
newInventory
protected void newInventory(int size, String displayName)
-
refreshInventory
protected void refreshInventory()
-
onItemClick
public void onItemClick(org.bukkit.event.inventory.InventoryClickEvent event)
-
onInventoryClosed
public void onInventoryClosed()
-
onClose
protected void onClose()
-
clone
protected static org.bukkit.inventory.ItemStack clone(org.bukkit.inventory.ItemStack stack)
-
getItemStack
@Nullable public @Nullable org.bukkit.inventory.ItemStack getItemStack(GuiToggle guiToggle)
-
handler
public GuiHandler handler()
-
-