Because the entity that exploded might be null (or might not be TNT)

This commit is contained in:
GJ 2013-10-15 13:10:29 -04:00
parent 468fbdab56
commit bf4e8d43ea

View File

@ -468,7 +468,7 @@ public class EntityListener implements Listener {
public void onEntityExplodeMonitor(EntityExplodeEvent event) {
Entity entity = event.getEntity();
if (!entity.hasMetadata(mcMMO.tntsafeMetadataKey)) {
if (!(entity instanceof TNTPrimed) || !entity.hasMetadata(mcMMO.tntsafeMetadataKey)) {
return;
}