Solved Adding metadata to NMS Packet (Reading with ProtocolLib)

Discussion in 'Spigot Plugin Development' started by 7smile7, Sep 15, 2019.

  1. Hi guys.
    ProtocolLibs PacketContainer has a method "#getMeta(String)" that lets me read different MetaDatas from an incomming packet.

    I now want to send an NMS packet (PacketPlayOutMapChunk) with a MetaData (type=String) via the NMS PlayerConnection that can be read by PacketContainer#getMeta(String).

    Anyone has any idea how to add this meta to the packet?

    PS im currently trying to reverse engineer the method from ProtocolLibs source code o_O... but that might take a while.

    Ok i found it.
    The packet itself is not beeing altered at all.
    ProtocolLib handels Metadata with internal mappings... sadlife
     
    #1 7smile7, Sep 15, 2019
    Last edited: Sep 15, 2019