From 9496c2dad17a8fdee3f879fd74a6b4f9008b4b9d Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 2 Jun 2017 18:28:30 +1000 Subject: [PATCH] SPIGOT-3284: Allow TNTPrimed#getSource to return invalid entities Eg dead players. --- .../org/bukkit/craftbukkit/entity/CraftTNTPrimed.java | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftTNTPrimed.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftTNTPrimed.java index c493c9c0c3..dd9c659399 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftTNTPrimed.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftTNTPrimed.java @@ -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; } }