2024-11-09 22:35:58 +01:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Gero <gecam59@gmail.com>
|
|
|
|
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
|
2024-12-01 23:07:46 +01:00
|
|
|
index 7db77a36701e766c148e91d8313838d307855d8a..657d8af7cc104962ee46ad1a7dc88b13c24262db 100644
|
2024-11-09 22:35:58 +01:00
|
|
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
2024-12-01 23:07:46 +01:00
|
|
|
@@ -2794,7 +2794,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
2024-11-09 22:35:58 +01:00
|
|
|
// CraftBukkit start
|
|
|
|
entity.valid = false;
|
|
|
|
if (!(entity instanceof ServerPlayer)) {
|
|
|
|
- for (ServerPlayer player : ServerLevel.this.players) {
|
2024-11-09 22:53:53 +01:00
|
|
|
+ for (ServerPlayer player : ServerLevel.this.server.getPlayerList().players) { // Paper - call onEntityRemove for all online players
|
2024-11-09 22:35:58 +01:00
|
|
|
player.getBukkitEntity().onEntityRemove(entity);
|
|
|
|
}
|
|
|
|
}
|