mirror of
https://github.com/taoneill/war.git
synced 2024-11-13 05:54:31 +01:00
Handle deaths after they have been counted and rewarded.
This prevents a problem where players could be rewarded after the game ends
This commit is contained in:
parent
dbac21aa44
commit
12b5f8350f
@ -171,15 +171,6 @@ public class WarEntityListener implements Listener {
|
||||
team.teamcast(killMessage);
|
||||
}
|
||||
}
|
||||
// this is just an idea for further discussion
|
||||
// if (defenderWarzone.getKillCount(d.getName()) >= 5) {
|
||||
// defenderTeam.addPoint();
|
||||
// for (Team team : defenderWarzone.getTeams()) {
|
||||
// team.teamcast(defenderTeam.getKind().getColor() + d.getName() + ChatColor.WHITE + " killed " + attackerTeam.getKind().getColor() + a.getName()
|
||||
// + ChatColor.WHITE + " and scored an extra point for their team.");
|
||||
// }
|
||||
// }
|
||||
defenderWarzone.handleDeath(d);
|
||||
if (attacker.getEntityId() != defender.getEntityId()) {
|
||||
defenderWarzone.addKillCount(a.getName(), 1);
|
||||
defenderWarzone.addKillDeathRecord(a, 1, 0);
|
||||
@ -191,7 +182,7 @@ public class WarEntityListener implements Listener {
|
||||
War.war.getKillstreakReward().rewardPlayer(a, defenderWarzone.getKillCount(a.getName()));
|
||||
}
|
||||
}
|
||||
|
||||
defenderWarzone.handleDeath(d);
|
||||
if (!defenderWarzone.getWarzoneConfig().getBoolean(WarzoneConfig.REALDEATHS)) {
|
||||
// fast respawn, don't really die
|
||||
event.setCancelled(true);
|
||||
|
Loading…
Reference in New Issue
Block a user