diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/CraftWorld.java | 2 | ||||
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index 2bbbdd37..d4c1a123 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -826,7 +826,7 @@ public class CraftWorld implements World { public <T> void playEffect(Location loc, Effect effect, T data, int radius) { if (data != null) { - Validate.isTrue(data.getClass().equals(effect.getData()), "Wrong kind of data for this effect!"); + Validate.isTrue(data.getClass().isAssignableFrom(effect.getData()), "Wrong kind of data for this effect!"); } else { Validate.isTrue(effect.getData() == null, "Wrong kind of data for this effect!"); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index 40f52f1e..bffb0389 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -325,7 +325,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public <T> void playEffect(Location loc, Effect effect, T data) { if (data != null) { - Validate.isTrue(data.getClass().equals(effect.getData()), "Wrong kind of data for this effect!"); + Validate.isTrue(data.getClass().isAssignableFrom(effect.getData()), "Wrong kind of data for this effect!"); } else { Validate.isTrue(effect.getData() == null, "Wrong kind of data for this effect!"); } |