public void overrideArena(Player p, Integer arena) { Main.getInstance().Arena.set("Arena" + arena, null); Main.getInstance().Chest.set("Chest." + arena, null); Main.getInstance().Arena.set("Arena." + arena + ".Enabled", true); ConfigManager.getInstance().saveYamls(); WorldEditUtility.getInstance().overrideSave(p, arena); Game g = getGameByID(arena); getGames().remove(g); games.add(new Game(arena, true)); }
public int createGame(Player p) { int amount = this.getArenaAmount(); int newGame = amount + 1; WorldEditUtility.getInstance().saveArena(p, newGame); Main.getInstance().Arena.set("Arena." + newGame + ".Enabled", true); Main.getInstance().Arena.set("Arena." + newGame + ".Active", false); Main.getInstance().Arena.set("Amount", newGame); ConfigManager.getInstance().saveYamls(); games.add(new Game(newGame, true)); return newGame; }
public void deactivate(int game) { Main.getInstance().Arena.set("Arena." + game + ".Active", false); ConfigManager.getInstance().saveYamls(); }
public void enableGame(int game) { Main.getInstance().Arena.set("Arena." + game + ".Enabled", true); ConfigManager.getInstance().saveYamls(); }