3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-14 20:10:05 +01:00
Paper/patches/server/1060-Call-CraftPlayer-onEntityRemove-for-all-online-playe.patch
Jake Potrebic 94ea770212
Re-add exact choice shapeless support (#11546)
* Re-add exact choice shapeless support

* don't re-create maps every shapeless match

* add missing paper comment with last patch
2024-11-09 13:53:53 -08:00

20 Zeilen
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 5964d601c05176f48167cc92057a59e52a4da92b..3b6b6483bf855493948417f44f06427b625bc910 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 : ServerLevel.this.server.getPlayerList().players) { // Paper - call onEntityRemove for all online players
player.getBukkitEntity().onEntityRemove(entity);
}
}