Esempio n. 1
0
  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));
  }
Esempio n. 2
0
  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;
  }
Esempio n. 3
0
 public void deactivate(int game) {
   Main.getInstance().Arena.set("Arena." + game + ".Active", false);
   ConfigManager.getInstance().saveYamls();
 }
Esempio n. 4
0
 public void enableGame(int game) {
   Main.getInstance().Arena.set("Arena." + game + ".Enabled", true);
   ConfigManager.getInstance().saveYamls();
 }