Пример #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;
 }
Пример #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);
   }
 }
Пример #3
0
 @Override
 public void setDisplayTeams(boolean display) {
   kills.setDisplayTeams(display);
 }
Пример #4
0
 @Override
 public TreeMap<Integer, Collection<ArenaTeam>> getRanks() {
   return kills.getTeamRanks();
 }
Пример #5
0
 @Override
 public List<ArenaTeam> getLeaders() {
   return kills.getTeamLeaders();
 }
Пример #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);
 }