diff --git a/src/com/garbagemule/MobArena/ArenaMasterImpl.java b/src/com/garbagemule/MobArena/ArenaMasterImpl.java index a1b9553..1e422fa 100644 --- a/src/com/garbagemule/MobArena/ArenaMasterImpl.java +++ b/src/com/garbagemule/MobArena/ArenaMasterImpl.java @@ -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); diff --git a/src/com/garbagemule/MobArena/framework/ArenaMaster.java b/src/com/garbagemule/MobArena/framework/ArenaMaster.java index ef2f9c7..44f3a65 100644 --- a/src/com/garbagemule/MobArena/framework/ArenaMaster.java +++ b/src/com/garbagemule/MobArena/framework/ArenaMaster.java @@ -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);