dmulloy2/PacketWrapper

[Bug] Advancement Wrapper - Null Pointer

brettsaunders21 opened this issue · 1 comments

I created a simple test program to just get advancements when they are sent, but it just throws a null pointer?

Error Log

    manager.addPacketListener(new PacketAdapter(Craftory.plugin, ListenerPriority.NORMAL,
        Server.ADVANCEMENTS) {
      @Override
      public void onPacketSending(PacketEvent event) {
        //Wrap Packet
        PacketContainer packetContainer = event.getPacket();
        WrapperPlayServerAdvancements playServerAdvancements =
            new WrapperPlayServerAdvancements(packetContainer);

        //Get advancements
        Optional<Map<MinecraftKey, SerializedAdvancement>> advancementOptional =
            playServerAdvancements.getAdvancements();
      }
    });`


Thank you! I got the same issue when working with 1.12 and 1.15+. In one version I get a nullpointer for not finding a constructor and in the other version I get an accessviolation.