mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-05 10:20:53 +01:00
SPIGOT-3284: Allow TNTPrimed#getSource to return invalid entities
Eg dead players.
This commit is contained in:
parent
e13d119686
commit
9496c2dad1
@ -55,14 +55,6 @@ public class CraftTNTPrimed extends CraftEntity implements TNTPrimed {
|
|||||||
public Entity getSource() {
|
public Entity getSource() {
|
||||||
EntityLiving source = getHandle().getSource();
|
EntityLiving source = getHandle().getSource();
|
||||||
|
|
||||||
if (source != null) {
|
return (source != null) ? source.getBukkitEntity() : null;
|
||||||
Entity bukkitEntity = source.getBukkitEntity();
|
|
||||||
|
|
||||||
if (bukkitEntity.isValid()) {
|
|
||||||
return bukkitEntity;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user