ArenaManager
public class CoreArenaManager extends java.lang.Object implements ArenaManager
Constructor | Description |
---|---|
CoreArenaManager(Game game) |
Modifier and Type | Method | Description |
---|---|---|
void |
clearArenas() |
Unload and delete all arena worlds.
|
ArenaEditor |
createEditor(java.lang.String name,
GamePlayer player) |
Creates an editing session for an arena.
|
boolean |
createSchematic(GamePlayer player,
java.lang.String name) |
Creates a schematic from the player's WorldEdit selection and places the schematic in the game's schematic folder.
|
void |
deleteWorld(org.bukkit.World world) |
Unloads a World from Bukkit and deletes it from the disk.
|
Arena |
getArena(java.lang.String name) |
Gets the arena with a certain name.
|
java.util.Map<java.lang.String,java.util.List<Arena>> |
getArenaMap() |
Gets the map of all active arenas, where the key is the name of the arena and the list is all arenas running for that map.
|
ArenaMenu |
getMenu() |
Gets the ArenaMenu object
|
boolean |
isArenaWorld(org.bukkit.World world) |
Check if a World belongs to an Arena.
|
void |
loadArenas() |
Loads stored data for arenas into memory.
|
void |
removeArena(Arena arena) |
Removes an Arena object from memory.
|
void |
setArenaClass(java.lang.Class<? extends Arena> newClass) |
Alters the Java class to be used for arenas, in case a game wishes to use a custom arena class.
|
void |
setLobby(org.bukkit.Location location) |
Sets the global lobby the location.
|
public CoreArenaManager(Game game)
public Arena getArena(java.lang.String name)
ArenaManager
getArena
in interface ArenaManager
name
- the name of the arena to search forpublic void removeArena(Arena arena)
ArenaManager
removeArena
in interface ArenaManager
arena
- the arena to removepublic void loadArenas()
ArenaManager
loadArenas
in interface ArenaManager
public void clearArenas()
ArenaManager
clearArenas
in interface ArenaManager
public ArenaEditor createEditor(java.lang.String name, GamePlayer player)
ArenaManager
createEditor
in interface ArenaManager
name
- the name of the arena to create the edit session forplayer
- the entity to apply the editing session toArenaEditor
public ArenaMenu getMenu()
ArenaManager
getMenu
in interface ArenaManager
public boolean createSchematic(GamePlayer player, java.lang.String name)
ArenaManager
createSchematic
in interface ArenaManager
player
- the GamePlayer to whose Player is associated with the selectionname
- the name of the schematicpublic void setLobby(org.bukkit.Location location)
ArenaManager
setLobby
in interface ArenaManager
location
- the new lobby locationpublic java.util.Map<java.lang.String,java.util.List<Arena>> getArenaMap()
ArenaManager
getArenaMap
in interface ArenaManager
public void setArenaClass(java.lang.Class<? extends Arena> newClass)
ArenaManager
setArenaClass
in interface ArenaManager
newClass
- the new Java class to use for arenasCoreArena
public boolean isArenaWorld(org.bukkit.World world)
ArenaManager
isArenaWorld
in interface ArenaManager
world
- the world to checkpublic void deleteWorld(org.bukkit.World world)
ArenaManager
deleteWorld
in interface ArenaManager
world
- the World to delete