[Bug] Advancement Wrapper - Null Pointer
brettsaunders21 opened this issue · 1 comments
brettsaunders21 commented
I created a simple test program to just get advancements when they are sent, but it just throws a null pointer?
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();
}
});`
WOLFI3654 commented
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.