2019-02-03 15:34:04 +00:00
|
|
|
From 39105c3c741bdead79bb7b8a21e38b3980e48017 Mon Sep 17 00:00:00 2001
|
2016-03-29 00:33:10 +00:00
|
|
|
From: Aikar <aikar@aikar.co>
|
|
|
|
Date: Mon, 28 Mar 2016 20:32:58 -0400
|
|
|
|
Subject: [PATCH] Entity AddTo/RemoveFrom World Events
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
2019-02-03 15:34:04 +00:00
|
|
|
index 541d9c2d6..5b36e7590 100644
|
2016-03-29 00:33:10 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/World.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/World.java
|
2019-02-03 15:34:04 +00:00
|
|
|
@@ -1032,6 +1032,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
2016-03-29 00:33:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
entity.valid = true; // CraftBukkit
|
2016-03-29 00:58:42 +00:00
|
|
|
+ new com.destroystokyo.paper.event.entity.EntityAddToWorldEvent(entity.getBukkitEntity()).callEvent(); // Paper - fire while valid
|
2016-03-29 00:33:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
protected void c(Entity entity) {
|
2019-02-03 15:34:04 +00:00
|
|
|
@@ -1039,6 +1040,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
2018-07-15 01:53:17 +00:00
|
|
|
((IWorldAccess) this.v.get(i)).b(entity);
|
2016-03-29 00:33:10 +00:00
|
|
|
}
|
|
|
|
|
2016-03-29 00:57:15 +00:00
|
|
|
+ new com.destroystokyo.paper.event.entity.EntityRemoveFromWorldEvent(entity.getBukkitEntity()).callEvent(); // Paper - fire while valid
|
2016-03-29 00:33:10 +00:00
|
|
|
entity.valid = false; // CraftBukkit
|
|
|
|
}
|
|
|
|
|
|
|
|
--
|
2019-01-01 03:15:55 +00:00
|
|
|
2.20.1
|
2016-03-29 00:33:10 +00:00
|
|
|
|