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
-
Constructor Summary
Constructors Constructor Description GuiManager(PlayerParticles playerParticles)
-
Method Summary
Modifier and Type Method Description void
disable()
Cleans up the Manager's resourcesvoid
forceCloseAllOpenGUIs()
Forcefully closes all open PlayerParticles GUIs Used for when the plugin unloads so players can't take items from the GUIboolean
isGuiDisabled()
Gets if the GUI is disabled by the server owner or notvoid
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 playervoid
openGroups(PPlayer pplayer)
Opens the groups GUI screen for a playervoid
openParticles(PPlayer pplayer)
Opens the edit particles GUI screen for a playervoid
openPresetGroups(PPlayer pplayer)
Opens the preset groups GUI screen for a playervoid
reload()
Reloads the Manager's settingsvoid
run()
Ticks GuiInventoriesvoid
transition(GuiInventory nextInventory)
Changes the player's inventory to another one
-
Constructor Details
-
Method Details
-
reload
public void reload()Description copied from class:Manager
Reloads the Manager's settings -
disable
public void disable()Description copied from class:Manager
Cleans up the Manager's resources -
run
public void run()Ticks GuiInventories- Specified by:
run
in interfacejava.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
Opens the default GUI screen for a player- Parameters:
pplayer
- The PPlayer to open the GUI screen for
-
openPresetGroups
Opens the preset groups GUI screen for a player- Parameters:
pplayer
- The PPlayer to open the GUI screen for
-
openGroups
Opens the groups GUI screen for a player- Parameters:
pplayer
- The PPlayer to open the GUI screen for
-
openParticles
Opens the edit particles GUI screen for a player- Parameters:
pplayer
- The PPlayer to open the GUI screen for
-
transition
Changes the player's inventory to another one- Parameters:
nextInventory
- The GuiInventory to transition to
-