예제 #1
0
  @Override
  public void parseStart() {
    getLifeMap().clear();
    for (final ArenaTeam team : arena.getTeams()) {
      if (!team.getTeamMembers().isEmpty()) {
        arena.getDebugger().i("adding team " + team.getName());
        // team is active
        getLifeMap()
            .put(team.getName(), arena.getArenaConfig().getInt(CFG.GOAL_BLOCKDESTROY_LIVES, 1));
      }
      final Set<PABlockLocation> blocks = SpawnManager.getBlocksContaining(arena, "block");

      for (final PABlockLocation block : blocks) {
        takeBlock(team.getColor().name(), block);
      }
    }
  }
예제 #2
0
  @Override
  public void initate(final Player player) {
    final ArenaPlayer aPlayer = ArenaPlayer.parsePlayer(player.getName());
    final ArenaTeam team = aPlayer.getArenaTeam();
    if (!getLifeMap().containsKey(team.getName())) {
      getLifeMap()
          .put(
              aPlayer.getArenaTeam().getName(),
              arena.getArenaConfig().getInt(CFG.GOAL_BLOCKDESTROY_LIVES));

      final Set<PABlockLocation> blocks = SpawnManager.getBlocksContaining(arena, "block");

      for (final PABlockLocation block : blocks) {
        takeBlock(team.getColor().name(), block);
      }
    }
  }