Unable to add fake players to tab. #2526
-
I've recently updated from 1.18.2 to 1.20.1, and with that updated Protocollib to 5.1.0, however I'm running into an issue that I am unable to get fake players to show up in the Tablist. I can send the packets, and I can intercept the packets, but at the end of the day it's just not showing up ingame. Here is a basic example while I was trying to figure out the issue: private final EnumSet<EnumWrappers.PlayerInfoAction> actions = EnumSet.of(ADD_PLAYER, UPDATE_DISPLAY_NAME);
pm = ProtocolLibrary.getProtocolManager();
PacketContainer testPacket = pm.createPacket(PacketType.Play.Server.PLAYER_INFO);
testPacket.getPlayerInfoActions().write(0, actions);
testPacket.getPlayerInfoDataLists().write(1, Collections.singletonList(new PlayerInfoData(uuid, 0, true, EnumWrappers.NativeGameMode.CREATIVE, new WrappedGameProfile(UUID.randomUUID(), "testName"), WrappedChatComponent.fromText("testDisplayName"))));
pm.sendServerPacket(p, testPacket, false); I'd appreciate any help regarding why this is not working. |
Beta Was this translation helpful? Give feedback.
Answered by
lukalt
Sep 4, 2023
Replies: 1 comment 1 reply
-
Hi, please try adding |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
LM-Wolfert
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
please try adding
UPDATE_LISTED
to the actions set