Tab list changes must be broadcasted

Signed-off-by: TheMode <themode@outlook.fr>
This commit is contained in:
TheMode 2022-01-29 16:59:46 +01:00
parent 624ccbdee8
commit f9080fa4f8

View File

@ -1229,7 +1229,7 @@ public class Player extends LivingEntity implements CommandSender, Localizable,
// Condition to prevent sending the packets before spawning the player
if (isActive()) {
sendPacket(new ChangeGameStatePacket(ChangeGameStatePacket.Reason.CHANGE_GAMEMODE, gameMode.getId()));
sendPacketToViewersAndSelf(new PlayerInfoPacket(PlayerInfoPacket.Action.UPDATE_GAMEMODE,
PacketUtils.broadcastPacket(new PlayerInfoPacket(PlayerInfoPacket.Action.UPDATE_GAMEMODE,
new PlayerInfoPacket.UpdateGameMode(getUuid(), gameMode)));
}