public class GuiWallManager extends Object
GuiWallInstances
and renders their standby interaction.Modifier and Type | Field and Description |
---|---|
static int |
SIGHT_RADIUS
The constant SIGHT_RADIUS defines the squared radius a player has to be in, in order to see the standby-screen
|
Constructor and Description |
---|
GuiWallManager() |
Modifier and Type | Method and Description |
---|---|
GuiWallInstance |
getActiveInstance(int id)
Gets the instance for the given id
|
GuiWallInstance |
getActiveInstance(org.bukkit.Location location)
Gets the instance at that location.
|
List<GuiWallInstance> |
getActiveInstances()
Gets all registered instances.
|
List<GuiWallInstance> |
getActiveInstances(org.bukkit.Location location)
Gets all instances that can be interacted with at that location.
|
List<GuiWallInstance> |
getActiveInstances(org.bukkit.entity.Player player)
Gets all instances the player is interacting with.
|
List<GuiWallInstance> |
getInSightInstances(org.bukkit.Location location)
Gets in sight instances.
|
static GuiWallManager |
getInstance()
Gets GuiWallManager instance.
|
int |
getNextId()
Gets the next available GuiWallInstance ID.
|
void |
registerInstance(GuiWallInstance instance,
boolean save)
Registers a new wall instance allowing players to interact with it
and to see the standby screen.
|
void |
setup()
Sets up the manager.
|
void |
shutdown()
Shuts down the manager.
|
void |
unregisterInstance(GuiWallInstance instance,
boolean delete)
Unregisters the instance reverting the
registerInstance(GuiWallInstance, boolean) method. |
public static final int SIGHT_RADIUS
public static GuiWallManager getInstance()
public void setup()
public void shutdown()
public void registerInstance(GuiWallInstance instance, boolean save)
save
is set to true
then the instance will be
saved to file and automatically be loaded from now on.instance
- the instancesave
- whether to save the instancepublic void unregisterInstance(GuiWallInstance instance, boolean delete)
registerInstance(GuiWallInstance, boolean)
method.instance
- the instancedelete
- whether to delete the instance from filepublic List<GuiWallInstance> getActiveInstances(org.bukkit.entity.Player player)
player
- the playerpublic List<GuiWallInstance> getActiveInstances(org.bukkit.Location location)
location
- the locationpublic List<GuiWallInstance> getInSightInstances(org.bukkit.Location location)
SIGHT_RADIUS
)location
- the locationpublic int getNextId()
public List<GuiWallInstance> getActiveInstances()
public GuiWallInstance getActiveInstance(int id)
id
- the idpublic GuiWallInstance getActiveInstance(org.bukkit.Location location)
location
- the locationCopyright © 2021. All rights reserved.