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 ping and game mode updates 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/0247-Send-ping-and-game-mode-updates-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 eeb3078809c87cf793e1146bd815936a4e88f024 Mon Sep 17 00:00:00 2001 | ||
From: RoccoDev <[email protected]> | ||
Date: Wed, 21 Aug 2024 05:38:07 +0200 | ||
Subject: [PATCH] Send ping and game mode updates to sink players | ||
|
||
|
||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java | ||
index 762f9d24b..fb35d62db 100644 | ||
--- a/src/main/java/net/minecraft/server/PlayerList.java | ||
+++ b/src/main/java/net/minecraft/server/PlayerList.java | ||
@@ -929,6 +929,12 @@ public abstract class PlayerList { | ||
} | ||
recipient.playerConnection.sendPacket(packet.cloneFor(recipient)); | ||
} | ||
+ // Sink players | ||
+ for (WorldServer world : this.server.worlds) { | ||
+ for (EntityPlayer player : world.sinkPlayers.values()) { | ||
+ player.playerConnection.sendPacket(packet.cloneFor(player)); | ||
+ } | ||
+ } | ||
} | ||
// KigPaper end | ||
|
||
-- | ||
2.45.2 | ||
|