Prevent AddPlayer info packet from being sent twice

This commit is contained in:
themode 2021-12-27 12:33:39 +01:00 committed by TheMode
parent 3decf439c6
commit 26dbc59aa9

View File

@ -261,7 +261,7 @@ public class Player extends LivingEntity implements CommandSender, Localizable,
// FIXME: when using Geyser, this line remove the skin of the client
PacketUtils.broadcastPacket(getAddPlayerToList());
for (var player : MinecraftServer.getConnectionManager().getOnlinePlayers()) {
this.playerConnection.sendPacket(player.getAddPlayerToList());
if (player != this) sendPacket(player.getAddPlayerToList());
}
// Commands