SPIGOT-336, SPIGOT-3366, SPIGOT-5768, SPIGOT-6409, SPIGOT-6861, #1008: Add EntityRemoveEvent
By: DerFrZocker <derrieple@gmail.com>
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
--- a/net/minecraft/world/entity/monster/EntityEndermite.java
|
||||
+++ b/net/minecraft/world/entity/monster/EntityEndermite.java
|
||||
@@ -29,6 +29,10 @@
|
||||
import net.minecraft.world.level.block.state.IBlockData;
|
||||
import org.joml.Vector3f;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.event.entity.EntityRemoveEvent;
|
||||
+// CraftBukkit end
|
||||
+
|
||||
public class EntityEndermite extends EntityMonster {
|
||||
|
||||
private static final int MAX_LIFE = 2400;
|
||||
@@ -122,7 +126,7 @@
|
||||
}
|
||||
|
||||
if (this.life >= 2400) {
|
||||
- this.discard();
|
||||
+ this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user