SPIGOT-3284: Allow TNTPrimed#getSource to return invalid entities

Eg dead players.
This commit is contained in:
md_5 2017-06-02 18:28:30 +10:00
parent e13d119686
commit 9496c2dad1

View File

@ -55,14 +55,6 @@ public class CraftTNTPrimed extends CraftEntity implements TNTPrimed {
public Entity getSource() {
EntityLiving source = getHandle().getSource();
if (source != null) {
Entity bukkitEntity = source.getBukkitEntity();
if (bukkitEntity.isValid()) {
return bukkitEntity;
}
}
return null;
return (source != null) ? source.getBukkitEntity() : null;
}
}