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

View File

@ -1,7 +1,7 @@
name: MobArena
author: garbagemule
main: com.garbagemule.MobArena.MobArena
version: 0.95.5.25
version: 0.95.5.26
softdepend: [Multiverse-Core,Towny,Heroes,MagicSpells,Vault]
commands:
ma:

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);