mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-27 11:38:03 +01:00
Prevent AddPlayer info packet from being sent twice
This commit is contained in:
parent
3decf439c6
commit
26dbc59aa9
@ -261,7 +261,7 @@ public class Player extends LivingEntity implements CommandSender, Localizable,
|
|||||||
// FIXME: when using Geyser, this line remove the skin of the client
|
// FIXME: when using Geyser, this line remove the skin of the client
|
||||||
PacketUtils.broadcastPacket(getAddPlayerToList());
|
PacketUtils.broadcastPacket(getAddPlayerToList());
|
||||||
for (var player : MinecraftServer.getConnectionManager().getOnlinePlayers()) {
|
for (var player : MinecraftServer.getConnectionManager().getOnlinePlayers()) {
|
||||||
this.playerConnection.sendPacket(player.getAddPlayerToList());
|
if (player != this) sendPacket(player.getAddPlayerToList());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Commands
|
// Commands
|
||||||
|
Loading…
Reference in New Issue
Block a user