Ensure death by TNT is valid, fixes #283

This commit is contained in:
HappyPikachu 2018-02-11 23:41:30 -05:00
parent ca117da950
commit b367a54903

View File

@ -462,7 +462,7 @@ public class PlayerListener implements Listener {
} else if (damager instanceof TNTPrimed) { } else if (damager instanceof TNTPrimed) {
TNTPrimed tnt = (TNTPrimed) damager; TNTPrimed tnt = (TNTPrimed) damager;
Entity source = tnt.getSource(); Entity source = tnt.getSource();
if (source.isValid()) { if (source != null && source.isValid()) {
killMob(source, evt.getEntity()); killMob(source, evt.getEntity());
} }
} else if (damager instanceof Wolf) { } else if (damager instanceof Wolf) {