mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 03:52:45 +01:00
SPIGOT-3284: Allow TNTPrimed#getSource to return invalid entities
Eg dead players. By: md_5 <git@md-5.net>
This commit is contained in:
parent
ea6ca4328a
commit
23a6a85a95
1 changed files with 1 additions and 9 deletions
|
@ -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 a new issue