Files
CatServer/patches/net/minecraft/entity/EntityCreature.java.patch
2018-09-08 11:39:03 +08:00

29 lines
1.1 KiB
Diff

--- ../src-base/minecraft/net/minecraft/entity/EntityCreature.java
+++ ../src-work/minecraft/net/minecraft/entity/EntityCreature.java
@@ -1,6 +1,9 @@
package net.minecraft.entity;
import java.util.UUID;
+
+import org.bukkit.event.entity.EntityUnleashEvent;
+
import net.minecraft.entity.ai.EntityAIBase;
import net.minecraft.entity.ai.EntityAIMoveTowardsRestriction;
import net.minecraft.entity.ai.attributes.AttributeModifier;
@@ -90,6 +93,7 @@
{
if (f > 10.0F)
{
+ this.worldObj.getServer().getPluginManager().callEvent(new EntityUnleashEvent(this.getBukkitEntity(), EntityUnleashEvent.UnleashReason.DISTANCE)); // CraftBukkit
this.clearLeashed(true, true);
}
@@ -128,6 +132,7 @@
if (f > 10.0F)
{
+ this.worldObj.getServer().getPluginManager().callEvent(new EntityUnleashEvent(this.getBukkitEntity(), EntityUnleashEvent.UnleashReason.DISTANCE)); // CraftBukkit
this.clearLeashed(true, true);
}
}