Completely custom CUSTOM_PAYLOAD
Make sure you're doing the following
- [x] You're using the latest build for your server version
- [x] This isn't an issue caused by another plugin
- [x] You've checked for duplicate issues
- [x] You didn't use
/reload
Describe the question I'm making a plugin that interacts with an optional client mod through custom packets. Unfortunately, the type PacketType.Play.Server.CUSTOM_PAYLOAD requires a CustomPacketPayload instead of the standard strings / MinecraftKeys. How do I create a payload? (That class does not exist in the paper api, I got it from fabric server decompilation) How do I apply that payload to the packet, possibly in a cross-version compatible way?
API method(s) used new PacketContainer(PacketType.Play.Server.CUSTOM_PAYLOAD) PacketContainer#getMinecraftKeys()#write(...) PacketContainer#getStrings()#write(...)
Expected behavior A packet gets written and sent
Code I have no working code currently
Additional context Latest version of ProtocolLib available (5.4.0), minecraft version 1.21.1