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?
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();
}
});`