ProtocolLib

3M Downloads

PacketWrapper Advancement Packet Issues

SkyLicks opened this issue ยท 1 comments

commented

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Create a packet listener for the advancement packet.
  2. Use the WrapperPlayServerAdvancements packet wrapper to getAdvancements
    ProtocolLibrary.getProtocolManager().addPacketListener( new PacketAdapter(Core.getInstance(), PacketType.Play.Server.ADVANCEMENTS) { @Override public void onPacketSending(PacketEvent event) { WrapperPlayServerAdvancements advancements = new WrapperPlayServerAdvancements(event.getPacket()); Map<MinecraftKey, WrapperPlayServerAdvancements.SerializedAdvancement> advancementMap = advancements.getAdvancements().orElse(null); } } );
  3. Now send yourself an advancement (really all I tested gave errors). For example: /advancement grant SkylixMC only minecraft:adventure/sleep_in_bed

Expected behavior
The expected behavior is to be able to retrieve advancements without errors

Screenshots
image

Version Info
Provide your ProtocolLib install info with /protocol dump through pastebin.](https://pastebin.com/rWKDfwSd)

Additional context
I'm was just trying to figure out how the advancement packet works so I can send "fake" packet advancements.

commented

PacketWrapper is currently not updated anymore. However there might be a version for 1.12, but I'm not sure...