forked from PaperMC/Paper
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
patch: send player list name to sink players
- Loading branch information
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
Spigot-Server-Patches/0248-Send-player-list-name-to-sink-players.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,26 @@ | ||
From 4c43597f381f31e07c3987930080088847bd4900 Mon Sep 17 00:00:00 2001 | ||
From: RoccoDev <hey@rocco.dev> | ||
Date: Mon, 23 Sep 2024 00:46:10 +0200 | ||
Subject: [PATCH] Send player list name to sink players | ||
|
||
|
||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java | ||
index 582d7aa64..81b35e905 100644 | ||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java | ||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java | ||
@@ -285,6 +285,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player { | ||
player.playerConnection.sendPacket(packet.cloneFor(player)); // KigPaper - add cloneFor | ||
} | ||
} | ||
+ // KigPaper - sink players | ||
+ if (getHandle().world instanceof WorldServer) { | ||
+ for (EntityPlayer player : ((WorldServer) getHandle().world).sinkPlayers.values()) { | ||
+ player.playerConnection.sendPacket(packet.cloneFor(player)); | ||
+ } | ||
+ } | ||
} | ||
|
||
// KigPaper start | ||
-- | ||
2.45.2 | ||
|