diff options
author | T00thpick1 <t00thpick1dirko@gmail.com> | 2013-08-05 23:29:01 -0500 |
---|---|---|
committer | Wesley Wolfe <weswolf@aol.com> | 2013-08-06 00:38:44 -0500 |
commit | 4aeb3ff63d31edd070ced439ffbae79d9a938492 (patch) | |
tree | 1a4a14dfe9b45bf42cca01223ab62332f414625a /src/main/java | |
parent | e489840ca9c7cbb82e63f7ce2ec6a1224b28cab9 (diff) | |
download | craftbukkit-4aeb3ff63d31edd070ced439ffbae79d9a938492.tar craftbukkit-4aeb3ff63d31edd070ced439ffbae79d9a938492.tar.gz craftbukkit-4aeb3ff63d31edd070ced439ffbae79d9a938492.tar.lz craftbukkit-4aeb3ff63d31edd070ced439ffbae79d9a938492.tar.xz craftbukkit-4aeb3ff63d31edd070ced439ffbae79d9a938492.zip |
Call unleash event for non-sitting animals. Fixes BUKKIT-4658
The unleash event is only called for animals that are sitting - ones that
receive no movement vector. This adds the missing event call for
non-sitting animals.
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityCreature.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/EntityCreature.java b/src/main/java/net/minecraft/server/EntityCreature.java index c2f63c4c..44b60246 100644 --- a/src/main/java/net/minecraft/server/EntityCreature.java +++ b/src/main/java/net/minecraft/server/EntityCreature.java @@ -5,6 +5,7 @@ import java.util.UUID; // CraftBukkit start import org.bukkit.craftbukkit.entity.CraftEntity; import org.bukkit.event.entity.EntityTargetEvent; +import org.bukkit.event.entity.EntityUnleashEvent; // CraftBukkit end public abstract class EntityCreature extends EntityInsentient { @@ -264,7 +265,7 @@ public abstract class EntityCreature extends EntityInsentient { if (this instanceof EntityTameableAnimal && ((EntityTameableAnimal) this).isSitting()) { if (f > 10.0F) { - this.world.getServer().getPluginManager().callEvent(new org.bukkit.event.entity.EntityUnleashEvent(this.getBukkitEntity(), org.bukkit.event.entity.EntityUnleashEvent.UnleashReason.DISTANCE)); // CraftBukkit + this.world.getServer().getPluginManager().callEvent(new EntityUnleashEvent(this.getBukkitEntity(), EntityUnleashEvent.UnleashReason.DISTANCE)); // CraftBukkit this.a(true, true); } @@ -293,6 +294,7 @@ public abstract class EntityCreature extends EntityInsentient { } if (f > 10.0F) { + this.world.getServer().getPluginManager().callEvent(new EntityUnleashEvent(this.getBukkitEntity(), EntityUnleashEvent.UnleashReason.DISTANCE)); // CraftBukkit this.a(true, true); } } else if (!this.bH() && this.bt) { |