mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-15 14:13:56 +01:00
Call CraftPlayer#onEntityRemove for all online players (#11598)
This commit is contained in:
parent
468c86ed14
commit
f58c7cc474
1 changed files with 19 additions and 0 deletions
|
@ -0,0 +1,19 @@
|
|||
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -0,0 +0,0 @@ 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);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue