ProtocolLib

3M Downloads

v5-SNAPSHOT | Cant create PLAYER_INFO packet

MahmutTaylanOzturk opened this issue · 6 comments

commented
  • This issue is not solved in a development build

Describe the bug
This bug is thrown when I try to create player info packet

To Reproduce
Steps to reproduce the behavior:

  1. use the latest v5 dependecy from repo host
  2. Join the game and wait for tab creation
  3. After the creation of tab it will create player info packets too

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
image

Version Info
Provide your ProtocolLib install info with /protocol dump through pastebin.

Additional context
Stack trace of error: https://paste.md-5.net/siqoponena.cs

commented

You need to migrate from getPlayerInfoAction() to grtPlayerInfoActions(). Check https://wiki.vg/Protocol for reference. Also you need to use index 1 for the entry list.

commented

You need to migrate from getPlayerInfoAction() to grtPlayerInfoActions(). Check https://wiki.vg/Protocol for reference. Also you need to use index 1 for the entry list.

Converted to this
image

But now I am getting this error
https://paste.md-5.net/kucijohuyi.bash

I am trying to convert this lib to 1.19. Can changing this getPacket method fix this whole project? Or what should I update in this api? https://github.com/thekeenant/tabbed

commented

I fixed the issue but now I there is no blank spaces in tab

Normal:
image
Current:
image

commented

Well, I do not think this is related to ProtocolLib but rather something changed with the Minecraft Client. Maybe you can try to set the empty lines to a non-empty string that it not rendered on client side, e.g. just "§a".

commented

That can be the issue. But I think the issue is new Listed boolean in PlayerInfoData. How can I send this listed packet to the player?
image

commented

Make sure to include UPDATE_LISTED in the actions set, i.e. ,

handle.getPlayerInfoActions().write(0, EnumSet.of(EnumWrappers.PlayerInfoAction.ADD_PLAYER, EnumWrappers.PlayerInfoAction.INITIALIZE_CHAT, EnumWrappers.PlayerInfoAction.UPDATE_GAME_MODE, EnumWrappers.PlayerInfoAction.UPDATE_LISTED, EnumWrappers.PlayerInfoAction.UPDATE_LATENCY, EnumWrappers.PlayerInfoAction.UPDATE_DISPLAY_NAME));

You can specify the listed flag in the constructor of PlayerInfoData