diff --git a/pom.xml b/pom.xml index cff0cd8..38153c5 100644 --- a/pom.xml +++ b/pom.xml @@ -29,7 +29,7 @@ com.github.steveice10 mcprotocollib - 1.20-1-SNAPSHOT + 1.20-2-SNAPSHOT diff --git a/src/main/java/org/barrelmc/barrel/network/translator/bedrock/PlayerListPacket.java b/src/main/java/org/barrelmc/barrel/network/translator/bedrock/PlayerListPacket.java index cec3f54..b3e5b0a 100644 --- a/src/main/java/org/barrelmc/barrel/network/translator/bedrock/PlayerListPacket.java +++ b/src/main/java/org/barrelmc/barrel/network/translator/bedrock/PlayerListPacket.java @@ -2,8 +2,10 @@ import com.github.steveice10.mc.auth.data.GameProfile; import com.github.steveice10.mc.protocol.data.game.PlayerListEntry; +import com.github.steveice10.mc.protocol.data.game.PlayerListEntryAction; import com.github.steveice10.mc.protocol.data.game.entity.player.GameMode; import com.github.steveice10.mc.protocol.packet.ingame.clientbound.ClientboundPlayerInfoRemovePacket; +import com.github.steveice10.mc.protocol.packet.ingame.clientbound.ClientboundPlayerInfoUpdatePacket; import net.kyori.adventure.text.Component; import org.barrelmc.barrel.network.translator.interfaces.BedrockPacketTranslator; import org.barrelmc.barrel.player.Player; @@ -11,6 +13,7 @@ import org.cloudburstmc.protocol.bedrock.packet.BedrockPacket; import java.util.ArrayList; +import java.util.EnumSet; import java.util.UUID; public class PlayerListPacket implements BedrockPacketTranslator { @@ -28,7 +31,7 @@ public void translate(BedrockPacket pk, Player player) { } PlayerListEntry[] playerListEntriesL = playerListEntries.toArray(new PlayerListEntry[0]); - //player.getJavaSession().send(new ClientboundPlayerInfoUpdatePacket(EnumSet.of(PlayerListEntryAction.ADD_PLAYER, PlayerListEntryAction.INITIALIZE_CHAT, PlayerListEntryAction.UPDATE_LISTED, PlayerListEntryAction.UPDATE_LATENCY, PlayerListEntryAction.UPDATE_GAME_MODE, PlayerListEntryAction.UPDATE_DISPLAY_NAME), playerListEntriesL)); + player.getJavaSession().send(new ClientboundPlayerInfoUpdatePacket(EnumSet.of(PlayerListEntryAction.ADD_PLAYER, PlayerListEntryAction.INITIALIZE_CHAT, PlayerListEntryAction.UPDATE_LISTED, PlayerListEntryAction.UPDATE_LATENCY, PlayerListEntryAction.UPDATE_GAME_MODE, PlayerListEntryAction.UPDATE_DISPLAY_NAME), playerListEntriesL)); break; } case REMOVE: {