Exemplo n.º 1
0
 public static void initGames() {
   List<String> currentgames = arenas.getStringList(YMLKeys.CURRENT_GAMES.key());
   //        checks for any extra games (aka removes unecessary)
   for (int c = 0; c < currentgames.size(); c++) {
     String game = currentgames.get(c);
     boolean contains = ArenaIO.getArenasKeys().contains(game), ingame = Arenas.isInGame(game);
     if (!contains || !ingame) {
       currentgames.remove(c);
     }
   }
   //        checks if any arenas are excluded (aka adds not included ones)
   for (String arena : ArenaIO.getArenasKeys()) {
     if (currentgames.contains(arena)) {
       if (!Arenas.isInGame(arena)) currentgames.remove(arena);
     } else {
       if (Arenas.isInGame(arena)) currentgames.add(arena);
     }
   }
   ArenaIO.arenasSet(YMLKeys.CURRENT_GAMES.key(), currentgames);
 }
Exemplo n.º 2
0
 public static void startGame(final String arenakey, int countdown) {
   tpAllOnlineTribs(arenakey, true);
   ArenaIO.arenasSet(YMLKeys.GAME_COUNT.key(), Arenas.getGameCount() + 1);
   startCountdown(arenakey, countdown);
 }