Check if TNT source is not null first, fixes #438

This commit is contained in:
HappyPikachu 2018-07-30 17:23:45 -04:00
parent 1678410ab8
commit 02f501d9e3

View File

@ -539,9 +539,11 @@ public class PlayerListener implements Listener {
} else if (damager instanceof TNTPrimed) {
TNTPrimed tnt = (TNTPrimed) damager;
Entity source = tnt.getSource();
if (source != null) {
if (source.isValid()) {
killPlayer(source, evt.getEntity());
}
}
} else if (damager instanceof Wolf) {
Wolf wolf = (Wolf) damager;
if (wolf.isTamed()) {