mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 10:46:05 +03:00
27 lines
1.0 KiB
Diff
27 lines
1.0 KiB
Diff
--- ../src-base/minecraft/net/minecraft/entity/EntityCreature.java
|
|
+++ ../src-work/minecraft/net/minecraft/entity/EntityCreature.java
|
|
@@ -7,6 +7,7 @@
|
|
import net.minecraft.util.math.BlockPos;
|
|
import net.minecraft.util.math.Vec3d;
|
|
import net.minecraft.world.World;
|
|
+import org.bukkit.event.entity.EntityUnleashEvent;
|
|
|
|
public abstract class EntityCreature extends EntityLiving
|
|
{
|
|
@@ -93,6 +94,7 @@
|
|
{
|
|
if (f > 10.0F)
|
|
{
|
|
+ this.world.getServer().getPluginManager().callEvent(new EntityUnleashEvent(this.getBukkitEntity(), EntityUnleashEvent.UnleashReason.DISTANCE));
|
|
this.clearLeashed(true, true);
|
|
}
|
|
|
|
@@ -103,6 +105,7 @@
|
|
|
|
if (f > 10.0F)
|
|
{
|
|
+ this.world.getServer().getPluginManager().callEvent(new EntityUnleashEvent(this.getBukkitEntity(), EntityUnleashEvent.UnleashReason.DISTANCE));
|
|
this.clearLeashed(true, true);
|
|
this.tasks.disableControlFlag(1);
|
|
}
|