forked from PaperMC/Paper
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Call CraftPlayer#onEntityRemove for all online players (PaperMC#11598)
- Loading branch information
1 parent
0af4e84
commit bcbd108
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
patches/server/1060-Call-CraftPlayer-onEntityRemove-for-all-online-playe.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} | ||
} |