mirror of
https://github.com/garbagemule/MobArena.git
synced 2024-11-23 11:06:14 +01:00
Expose a reloadArena() command in the ArenaMaster.
This commit is contained in:
parent
eb04693c3f
commit
709480a80f
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user