@Override public void onPlayerDeath(ArenaPlayer pl) { if (pl.getTeam() == Team.RED) { pl.sendMessage(getMessage("joinedInfected")); pl.setTeam(Team.BLUE); } }
private final void chooseInfected(int tries) { if (tries < 16) { ArenaPlayer ap = active.get(Util.random(active.size())); if (ap != null && ap.isOnline()) { ap.setTeam(Team.BLUE); ap.sendMessage(getMessage("patientZero")); onSpawn(ap); tellPlayers(getMessage("zombie"), ap.getName()); } else { chooseInfected(tries++); } } else { // Shouldn't happen... tellPlayers(getMessage("couldntFindZombie")); stop(); } }