Expose a reloadArena() command in the ArenaMaster.

This commit is contained in:
garbagemule 2013-08-20 17:31:37 +02:00
parent eb04693c3f
commit 709480a80f
2 changed files with 18 additions and 0 deletions

View File

@ -566,7 +566,23 @@ public class ArenaMasterImpl implements ArenaMaster
return arena;
}
@Override
public boolean reloadArena(String name) {
Arena arena = getArenaWithName(name);
if (arena == null) return false;
arena.forceEnd();
arenas.remove(arena);
plugin.reloadConfig();
config = plugin.getConfig();
loadArena(name);
return true;
}
// Create and load a new arena node
@Override
public Arena createArenaNode(String arenaName, World world) {
ConfigurationSection section = makeSection(config, "arenas");
return createArenaNode(section, arenaName, world, true);

View File

@ -126,6 +126,8 @@ public interface ArenaMaster
public void loadArenasInWorld(String worldName);
public void unloadArenasInWorld(String worldName);
public boolean reloadArena(String name);
public Arena createArenaNode(String configName, World world);