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