aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGero <[email protected]>2024-11-09 22:35:58 +0100
committerGitHub <[email protected]>2024-11-09 22:35:58 +0100
commitbcbd10804f46bf9bd6fd99eea65ac4383cef2313 (patch)
tree851691ded61b7961d28f88fe575760d38a44883d
parent0af4e84eff5e8f2819c12cd656d04b64664abb3c (diff)
downloadPaper-bcbd10804f46bf9bd6fd99eea65ac4383cef2313.tar.gz
Paper-bcbd10804f46bf9bd6fd99eea65ac4383cef2313.zip
Call CraftPlayer#onEntityRemove for all online players (#11598)
-rw-r--r--patches/server/1060-Call-CraftPlayer-onEntityRemove-for-all-online-playe.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/patches/server/1060-Call-CraftPlayer-onEntityRemove-for-all-online-playe.patch b/patches/server/1060-Call-CraftPlayer-onEntityRemove-for-all-online-playe.patch
new file mode 100644
index 0000000000..d50af99648
--- /dev/null
+++ b/patches/server/1060-Call-CraftPlayer-onEntityRemove-for-all-online-playe.patch
@@ -0,0 +1,19 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Gero <[email protected]>
+Date: Sat, 9 Nov 2024 22:27:58 +0100
+Subject: [PATCH] Call CraftPlayer#onEntityRemove for all online players
+
+
+diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
+index 5964d601c05176f48167cc92057a59e52a4da92b..3204497dea30365d7d23bb877af811248168afbf 100644
+--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
++++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
+@@ -2780,7 +2780,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+ // CraftBukkit start
+ entity.valid = false;
+ if (!(entity instanceof ServerPlayer)) {
+- for (ServerPlayer player : ServerLevel.this.players) {
++ for (ServerPlayer player : server.getPlayerList().players) {
+ player.getBukkitEntity().onEntityRemove(entity);
+ }
+ }