summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2017-11-13 08:47:04 +1100
committermd_5 <git@md-5.net>2017-11-13 08:47:04 +1100
commitadbfc1f98ab0dc27b470d62e3b57f802813caeec (patch)
tree14b07a1d611483f25e2ec84af9f3e559470704c0
parent61e0c69d5ff5b20f0d375c6d1c497efddfc7f3de (diff)
downloadcraftbukkit-adbfc1f98ab0dc27b470d62e3b57f802813caeec.tar
craftbukkit-adbfc1f98ab0dc27b470d62e3b57f802813caeec.tar.gz
craftbukkit-adbfc1f98ab0dc27b470d62e3b57f802813caeec.tar.lz
craftbukkit-adbfc1f98ab0dc27b470d62e3b57f802813caeec.tar.xz
craftbukkit-adbfc1f98ab0dc27b470d62e3b57f802813caeec.zip
SPIGOT-3649: Backwards check in playEffect
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 7739a3e4..27ae8475 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -440,7 +440,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
public void playEffect(EntityEffect type) {
Preconditions.checkArgument(type != null, "type");
- if (this.getClass().isAssignableFrom(type.getApplicable())) {
+ if (type.getApplicable().isInstance(this)) {
this.getHandle().world.broadcastEntityEffect(getHandle(), type.getData());
}
}