Package org.spout.vanilla.scoreboard

Examples of org.spout.vanilla.scoreboard.Team


      // check if the team is correct if specified
      Scoreboard board = p.get(Scoreboard.class);
      boolean correctTeam = teamName == null; // default to whether the team name is set
      if (teamName != null && board != null) {
        Team team = board.getTeam(teamName);
        if (team != null) {
          if (teamNameInverted) {
            // make sure the player is not on the specified team
            correctTeam = !team.getPlayerNames().contains(p.getName());
          } else {
            // make sure the player is on the specified team
            correctTeam = team.getPlayerNames().contains(p.getName());
          }
        }
      }

      // make sure the player has the right amount of points for the specified objectives
View Full Code Here


    Scoreboard scoreboard = player.get(Scoreboard.class);
    if (scoreboard == null) {
      throw new CommandException("You do not have an active scoreboard.");
    }

    Team t = scoreboard.createTeam("spoutdev");
    t.setDisplayName(ChatStyle.DARK_AQUA + "Spout", false);
    t.setPrefix(ChatStyle.GREEN.toString(), true);
    t.addPlayerName(name);
  }
View Full Code Here

    event.getMessages().add(new ScoreboardScoreMessage(event.getKey(), event.isRemove(), event.getObjectiveName(), event.getValue()));
  }

  @EventHandler
  public void onTeamAction(TeamActionEvent event) {
    Team team = event.getTeam();
    event.getMessages().add(new ScoreboardTeamMessage(
        team.getName(), event.getAction(),
        team.getDisplayName(),
        team.getPrefix(), team.getSuffix(),
        team.isFriendlyFire(), event.getPlayers()
    ));
  }
View Full Code Here

TOP

Related Classes of org.spout.vanilla.scoreboard.Team

Copyright © 2018 www.massapicom. 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.