public class GuiItemManager extends Object
GuiItemInstances
and keeps track of which player is currently interacting with which instance.Constructor and Description |
---|
GuiItemManager() |
Modifier and Type | Method and Description |
---|---|
GuiItemInstance |
getActiveInstance(org.bukkit.entity.Player player)
Gets the
GuiItemInstance the player is currently interacting with. |
static GuiItemManager |
getInstance()
Gets GuiItemManager instance.
|
GuiItemInstance |
getItemInstance(int mapId)
Gets the
GuiItemInstance that manages the given map id. |
GuiItemInstance |
getItemInstance(String layoutName)
Gets the
GuiItemInstance for the Layout with the given name. |
void |
setup()
Creates
GuiItemInstances for all known 1x1 layouts and starts
a repeating scheduler to track players interactions. |
void |
shutdown()
Disposes all resources and tasks this manages holds.
|
public static GuiItemManager getInstance()
public void setup()
GuiItemInstances
for all known 1x1 layouts and starts
a repeating scheduler to track players interactions.public void shutdown()
public GuiItemInstance getActiveInstance(org.bukkit.entity.Player player)
GuiItemInstance
the player is currently interacting with.player
- the playerpublic GuiItemInstance getItemInstance(String layoutName)
GuiItemInstance
for the Layout
with the given name.layoutName
- the layout namepublic GuiItemInstance getItemInstance(int mapId)
GuiItemInstance
that manages the given map id.mapId
- the map idCopyright © 2021. All rights reserved.