Call CraftPlayer#onEntityRemove for all online players

This commit is contained in:
Gero 2024-11-09 22:27:58 +01:00
parent 66e1ce8504
commit 7acf73ce66

View file

@ -1238,7 +1238,7 @@
+ // 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);
+ }
+ }