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,8 +539,10 @@ public class PlayerListener implements Listener {
} else if (damager instanceof TNTPrimed) {
TNTPrimed tnt = (TNTPrimed) damager;
Entity source = tnt.getSource();
if (source.isValid()) {
killPlayer(source, evt.getEntity());
if (source != null) {
if (source.isValid()) {
killPlayer(source, evt.getEntity());
}
}
} else if (damager instanceof Wolf) {
Wolf wolf = (Wolf) damager;