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 voiddisable()Cleans up the Manager's resourcesvoidforceCloseAllOpenGUIs()Forcefully closes all open PlayerParticles GUIs Used for when the plugin unloads so players can't take items from the GUIbooleanisGuiDisabled()Gets if the GUI is disabled by the server owner or notvoidonInventoryClick(org.bukkit.event.inventory.InventoryClickEvent event)voidonInventoryClose(org.bukkit.event.inventory.InventoryCloseEvent event)voidopenDefault(PPlayer pplayer)Opens the default GUI screen for a playervoidopenGroups(PPlayer pplayer)Opens the groups GUI screen for a playervoidopenParticles(PPlayer pplayer)Opens the edit particles GUI screen for a playervoidopenPresetGroups(PPlayer pplayer)Opens the preset groups GUI screen for a playervoidreload()Reloads the Manager's settingsvoidrun()Ticks GuiInventoriesvoidtransition(GuiInventory nextInventory)Changes the player's inventory to another one
-
Constructor Details
-
Method Details
-
reload
public void reload()Description copied from class:ManagerReloads the Manager's settings -
disable
public void disable()Description copied from class:ManagerCleans up the Manager's resources -
run
public void run()Ticks GuiInventories- Specified by:
runin 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
-