Examples of TeamKind


Examples of com.tommytony.war.config.TeamKind

        this.args = newargs;
      }

      // args have been shifted if needed
      if (this.args.length > 0) {
        TeamKind kind = TeamKind.teamKindFromString(this.args[0]);
        Team teamByName = zone.getTeamByKind(kind);
       
        if (team == null && teamByName == null) {
          // Team not found
          this.badMsg("No such team. Use /teams.");
View Full Code Here

Examples of com.tommytony.war.config.TeamKind

      return false;
    } else if (!this.isSenderAuthorOfZone(zone)) {
      return true;
    }

    TeamKind kind = TeamKind.teamKindFromString(this.args[0]);
    Team team = zone.getTeamByKind(kind);
    if (team == null) {
      // no such team yet
      this.msg("Place the team spawn first.");
    } else if (team.getFlagVolume() == null) {
View Full Code Here

Examples of com.tommytony.war.config.TeamKind

      return false;
    } else if (!this.isSenderAuthorOfZone(zone)) {
      return true;
    }

    TeamKind teamKind = TeamKind.teamKindFromString(this.args[0]);
   
    if (teamKind == null) {
      return false;
    } else {
      Team existingTeam = zone.getTeamByKind(teamKind);
      if (existingTeam != null) {
        // add additional spawn
        existingTeam.addTeamSpawn(player.getLocation());
        this.msg("Additional spawn added for team " + existingTeam.getName() + ". Use /deleteteam " + existingTeam.getName() + " to remove all spawns.");
        War.war.log(this.getSender().getName() + " moved team " + existingTeam.getName() + " in warzone " + zone.getName(), Level.INFO);
      } else {
        // new team (use default TeamKind name for now)
        Team newTeam = new Team(teamKind.toString(), teamKind, Collections.<Location>emptyList(), zone);
        newTeam.setRemainingLives(newTeam.getTeamConfig().resolveInt(TeamConfig.LIFEPOOL));
        zone.getTeams().add(newTeam);
        if (zone.getLobby() != null) {
          zone.getLobby().setLocation(zone.getTeleport());
          zone.getLobby().initialize();
View Full Code Here

Examples of com.tommytony.war.config.TeamKind

    }

    Player player = (Player) this.getSender();

    Warzone zone;
    TeamKind kind;
    if (this.args.length == 2) {
      // zone by name
      zone = Warzone.getZoneByName(this.args[0]);
      kind = TeamKind.teamKindFromString(this.args[1]);
    } else if (this.args.length == 1) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.