summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2017-07-22 09:51:22 +1000
committermd_5 <git@md-5.net>2017-07-22 09:51:22 +1000
commit5a12442f223f04b36ee78454419c7cb19e915aa7 (patch)
treeb29f03892e1f9c9188e7825b6a5b5a47d579bfb1 /src/main/java
parent9a82fa7785843e56b8799ca2b495b0ce115d79d6 (diff)
downloadcraftbukkit-5a12442f223f04b36ee78454419c7cb19e915aa7.tar
craftbukkit-5a12442f223f04b36ee78454419c7cb19e915aa7.tar.gz
craftbukkit-5a12442f223f04b36ee78454419c7cb19e915aa7.tar.lz
craftbukkit-5a12442f223f04b36ee78454419c7cb19e915aa7.tar.xz
craftbukkit-5a12442f223f04b36ee78454419c7cb19e915aa7.zip
SPIGOT-3433: Improve AreaEffectCloud#getSource
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftAreaEffectCloud.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAreaEffectCloud.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAreaEffectCloud.java
index 42f6ea4a..5f068416 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAreaEffectCloud.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAreaEffectCloud.java
@@ -14,6 +14,7 @@ import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.potion.CraftPotionUtil;
import org.bukkit.entity.AreaEffectCloud;
import org.bukkit.entity.EntityType;
+import org.bukkit.entity.LivingEntity;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
import org.bukkit.projectiles.ProjectileSource;
@@ -206,7 +207,8 @@ public class CraftAreaEffectCloud extends CraftEntity implements AreaEffectCloud
}
public ProjectileSource getSource() {
- return getHandle().projectileSource;
+ EntityLiving source = getHandle().y(); // PAIL: rename
+ return (source == null) ? null : (LivingEntity) source.getBukkitEntity();
}
public void setSource(ProjectileSource shooter) {
@@ -215,6 +217,5 @@ public class CraftAreaEffectCloud extends CraftEntity implements AreaEffectCloud
} else {
getHandle().setSource((EntityLiving) null);
}
- getHandle().projectileSource = shooter;
}
}