Ejemplo n.º 1
0
  /** Sets . */
  public void setup() {

    this.setCurrent(0);
    this.total = SkyApi.getSm().getArenaConfig().getConfig().getInt("arena.total");
    if (total > 0) {
      ArenaIO Aio = new ArenaIO();
      thearenas = Aio.loadArenas();
      arenaIds = Aio.getArenaKeys();
      for (String k : arenaIds) {
        String na = thearenas.get(Integer.parseInt(k)).getUniqueMap();
        nameToId.put(na, Integer.parseInt(k));
      }

    } else {
      SkyApi.getCMsg().WARNING("No Arenas were loaded, most likely none have been created");
    }
  }
Ejemplo n.º 2
0
  /**
   * Save arena by id.
   *
   * @param i the i
   */
  public void saveArenaById(Integer i) {

    Arena arena = getArenaById(i);
    ArenaIO AI = new ArenaIO();
    AI.saveArena(arena);
  }