public class LobbyManager
extends java.lang.Object
Constructor and Description |
---|
LobbyManager(java.lang.String plugin)
Creates a new lobby manager instance.
|
Modifier and Type | Method and Description |
---|---|
void |
add(org.bukkit.Location l,
java.lang.String arena,
LobbyType type,
int index)
Creates a new LobbySign to be managed.
|
LobbySign |
getSign(Location3D location)
Retrieves the lobby sign at the specified location, or null if it does
not exist.
|
java.util.List<LobbySign> |
getSignList()
Retrieves a list of lobby signs registered with this lobby manager.
|
java.util.HashMap<Location3D,LobbySign> |
getSigns()
Retrieves a hashmap mapping locations to lobby signs registered with this
lobby manager.
|
void |
loadSigns()
Loads lobby signs from disk.
|
void |
remove(LobbySign s)
Removes the given lobby sign.
|
void |
reset()
Resets all lobby signs to their default state (
waiting stage for status signs, blank for
player signs ). |
int |
save(LobbySign l)
Saves a lobby sign's data to disk.
|
void |
update(java.lang.String arena)
Updates all lobby signs linked to a specific arena.
|
public LobbyManager(java.lang.String plugin)
plugin
- The plugin to create the manager for.public java.util.HashMap<Location3D,LobbySign> getSigns()
public java.util.List<LobbySign> getSignList()
public void add(org.bukkit.Location l, java.lang.String arena, LobbyType type, int index) throws NoSuchArenaException, InvalidLocationException, java.lang.IllegalArgumentException
l
- the location to create the sign atarena
- the name of the arena the sign will be linked totype
- the type of the sign ("status" or "players")index
- the number of the sign (applicable only for "players"
signs)NoSuchArenaException
- if the specified arena does not existInvalidLocationException
- if the specified location does not
contain a signjava.lang.IllegalArgumentException
- if the specified index for a player sign
is less than 1public void update(java.lang.String arena)
arena
- the arena to update signs forpublic void reset()
waiting stage
for status
signs, blank for
player signs
).public void remove(LobbySign s)
s
- the lobby sign to removepublic int save(LobbySign l)
l
- the lobby sign to save to diskpublic LobbySign getSign(Location3D location)
location
- the location to search for a lobby sign atpublic void loadSigns()