Class GuiManager

java.lang.Object
dev.esophose.playerparticles.manager.Manager
dev.esophose.playerparticles.manager.GuiManager
All Implemented Interfaces:
java.lang.Runnable, org.bukkit.event.Listener

public class GuiManager
extends Manager
implements org.bukkit.event.Listener, java.lang.Runnable
  • Field Summary

    Fields inherited from class dev.esophose.playerparticles.manager.Manager

    playerParticles
  • Constructor Summary

    Constructors 
    Constructor Description
    GuiManager​(PlayerParticles playerParticles)  
  • Method Summary

    Modifier and Type Method Description
    void disable()
    Cleans up the Manager's resources
    void forceCloseAllOpenGUIs()
    Forcefully closes all open PlayerParticles GUIs Used for when the plugin unloads so players can't take items from the GUI
    boolean isGuiDisabled()
    Gets if the GUI is disabled by the server owner or not
    void onInventoryClick​(org.bukkit.event.inventory.InventoryClickEvent event)  
    void onInventoryClose​(org.bukkit.event.inventory.InventoryCloseEvent event)  
    void openDefault​(PPlayer pplayer)
    Opens the default GUI screen for a player
    void openGroups​(PPlayer pplayer)
    Opens the groups GUI screen for a player
    void openParticles​(PPlayer pplayer)
    Opens the edit particles GUI screen for a player
    void openPresetGroups​(PPlayer pplayer)
    Opens the preset groups GUI screen for a player
    void reload()
    Reloads the Manager's settings
    void run()
    Ticks GuiInventories
    void transition​(GuiInventory nextInventory)
    Changes the player's inventory to another one

    Methods inherited from class java.lang.Object

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

  • Method Details

    • reload

      public void reload()
      Description copied from class: Manager
      Reloads the Manager's settings
      Specified by:
      reload in class Manager
    • disable

      public void disable()
      Description copied from class: Manager
      Cleans up the Manager's resources
      Specified by:
      disable in class Manager
    • run

      public void run()
      Ticks GuiInventories
      Specified by:
      run in interface java.lang.Runnable
    • onInventoryClick

      public void onInventoryClick​(org.bukkit.event.inventory.InventoryClickEvent event)
    • onInventoryClose

      public void onInventoryClose​(org.bukkit.event.inventory.InventoryCloseEvent event)
    • isGuiDisabled

      public boolean isGuiDisabled()
      Gets if the GUI is disabled by the server owner or not
      Returns:
      True if the GUI is disabled
    • forceCloseAllOpenGUIs

      public void forceCloseAllOpenGUIs()
      Forcefully closes all open PlayerParticles GUIs Used for when the plugin unloads so players can't take items from the GUI
    • openDefault

      public void openDefault​(PPlayer pplayer)
      Opens the default GUI screen for a player
      Parameters:
      pplayer - The PPlayer to open the GUI screen for
    • openPresetGroups

      public void openPresetGroups​(PPlayer pplayer)
      Opens the preset groups GUI screen for a player
      Parameters:
      pplayer - The PPlayer to open the GUI screen for
    • openGroups

      public void openGroups​(PPlayer pplayer)
      Opens the groups GUI screen for a player
      Parameters:
      pplayer - The PPlayer to open the GUI screen for
    • openParticles

      public void openParticles​(PPlayer pplayer)
      Opens the edit particles GUI screen for a player
      Parameters:
      pplayer - The PPlayer to open the GUI screen for
    • transition

      public void transition​(GuiInventory nextInventory)
      Changes the player's inventory to another one
      Parameters:
      nextInventory - The GuiInventory to transition to