Exemplo n.º 1
0
 public AllKills(Match match) {
   super(match);
   kills = new ArenaObjective("allkills", "All Kills", 5);
   kills.setDisplayName(MessageUtil.colorChat("&4All Kills"));
   boolean isRated = match.getParams().isRated();
   boolean soloRating = !match.getParams().isTeamRating();
   sc = (isRated && soloRating) ? new StatController(match.getParams()) : null;
 }
Exemplo n.º 2
0
 @ArenaEventHandler(priority = EventPriority.LOW)
 public void onFindCurrentLeader(MatchFindCurrentLeaderEvent event) {
   Collection<ArenaTeam> leaders = kills.getLeaders();
   if (leaders.size() > 1) {
     event.setCurrentDrawers(leaders);
   } else {
     event.setCurrentLeaders(leaders);
   }
 }
Exemplo n.º 3
0
 @Override
 public void setDisplayTeams(boolean display) {
   kills.setDisplayTeams(display);
 }
Exemplo n.º 4
0
 @Override
 public TreeMap<Integer, Collection<ArenaTeam>> getRanks() {
   return kills.getTeamRanks();
 }
Exemplo n.º 5
0
 @Override
 public List<ArenaTeam> getLeaders() {
   return kills.getTeamLeaders();
 }
Exemplo n.º 6
0
 @ArenaEventHandler(priority = EventPriority.LOW)
 public void playerKillEvent(ArenaPlayerKillEvent event) {
   kills.addPoints(event.getPlayer(), event.getPoints());
   kills.addPoints(event.getTeam(), event.getPoints());
   if (sc != null) sc.addRecord(event.getPlayer(), event.getTarget(), WinLossDraw.WIN);
 }