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 color
    org.bukkit.inventory.Inventory getInventory()
    Gets the Inventory this GuiInventory is managing
    PPlayer getPPlayer()
    Gets the PPlayer this GuiInventory is managing
    void onClick​(org.bukkit.event.inventory.InventoryClickEvent event)
    Handles clicks of GuiActionButtons
    void onTick()
    Ticked at an interval to animate GuiActionButton icons
    protected void populate()
    Populates the Inventory with the contents of actionButtons

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • GuiInventory

      public GuiInventory​(PPlayer pplayer, org.bukkit.inventory.Inventory inventory)
  • Method Details

    • getPPlayer

      public PPlayer 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

      protected void fillBorder​(GuiInventory.BorderColor borderColor)
      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()