Boss abilities should no longer continue when bosses die due to untracked damage. Still waiting for Bukkit to add the missing damage handling.

This commit is contained in:
garbagemule 2012-03-11 16:14:45 +01:00
parent da0f028106
commit a058bce396
5 changed files with 19 additions and 2 deletions

Binary file not shown.

View File

@ -1,7 +1,7 @@
name: MobArena
author: garbagemule
main: com.garbagemule.MobArena.MobArena
version: 0.94.4.63
version: 0.94.4.64
softdepend: [Spout,MultiVerse,XcraftGate,Towny,Heroes,MagicSpells,Vault]
commands:
ma:

View File

@ -388,9 +388,15 @@ public class ArenaListener
}
}
}
MABoss boss = monsters.removeBoss(event.getEntity());
if (boss != null) {
boss.setDead(true);
}
if (!monsterExp)
if (!monsterExp) {
event.setDroppedExp(0);
}
event.getDrops().clear();

View File

@ -94,4 +94,14 @@ public class MABoss
public boolean isDead() {
return dead;
}
/**
* Set the death status of a boss.
* This is used by the ArenaListener to force kill bosses that die due to
* unhandled damage events (Bukkit issues).
* @param dead death status
*/
public void setDead(boolean dead) {
this.dead = dead;
}
}

View File

@ -42,6 +42,7 @@ public class WaveManager
}
public void reset() {
reloadWaves();
wave = 0;
singleWavesInstance = new TreeSet<Wave>(singleWaves);
}