mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-18 20:53:09 +01:00
19 lines
1.1 KiB
Diff
19 lines
1.1 KiB
Diff
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
|
|
index 17ddec036cb6135c7489efbd76121304e76c32c0..7e8713373315eebf57541f8afe10902681449ad9 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
|
@@ -2800,7 +2800,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 : ServerLevel.this.server.getPlayerList().players) { // Paper - call onEntityRemove for all online players
|
|
player.getBukkitEntity().onEntityRemove(entity);
|
|
}
|
|
}
|