Fix last standing API.

This commit is contained in:
garbagemule
2013-08-19 02:23:33 +02:00
parent 809ee2facb
commit 701177a9e2
2 changed files with 6 additions and 2 deletions
+5 -1
View File
@@ -650,8 +650,12 @@ public class ArenaImpl implements Arena
@Override
public void playerDeath(Player p)
{
// Check if we're the last player standing
boolean last = arenaPlayers.size() == 1;
if (last) lastStanding = p;
// Fire the event
ArenaPlayerDeathEvent event = new ArenaPlayerDeathEvent(p, this, arenaPlayers.size() == 1);
ArenaPlayerDeathEvent event = new ArenaPlayerDeathEvent(p, this, last);
plugin.getServer().getPluginManager().callEvent(event);
arenaPlayers.remove(p);