Skip to content

Commit

Permalink
Fix broken ClientboundPlayerInfoUpdatePacket serializer
Browse files Browse the repository at this point in the history
  • Loading branch information
DavyCraft648 committed Mar 11, 2024
1 parent d5c2da3 commit c51f988
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<dependency>
<groupId>com.github.steveice10</groupId>
<artifactId>mcprotocollib</artifactId>
<version>1.20-1-SNAPSHOT</version>
<version>1.20-2-SNAPSHOT</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,18 @@

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;
import org.barrelmc.barrel.utils.Utils;
import org.cloudburstmc.protocol.bedrock.packet.BedrockPacket;

import java.util.ArrayList;
import java.util.EnumSet;
import java.util.UUID;

public class PlayerListPacket implements BedrockPacketTranslator {
Expand All @@ -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: {
Expand Down

0 comments on commit c51f988

Please sign in to comment.