Adds null check in EntityExplodeEvent's handler, fixing WORLDGUARD-2267.

This commit is contained in:
sk89q 2012-11-04 13:05:25 -08:00
parent 47902e1177
commit 1ba7d623b4

View File

@ -496,6 +496,8 @@ public void onEntityExplode(EntityExplodeEvent event) {
return; return;
} }
// Not all explosions come from an entity
if (ent != null) {
if (ent.getType() == witherType) { if (ent.getType() == witherType) {
if (wcfg.blockWitherBlockDamage) { if (wcfg.blockWitherBlockDamage) {
event.blockList().clear(); event.blockList().clear();
@ -602,6 +604,7 @@ public void onEntityExplode(EntityExplodeEvent event) {
} }
} }
} }
}
if (wcfg.signChestProtection) { if (wcfg.signChestProtection) {
for (Block block : event.blockList()) { for (Block block : event.blockList()) {