-
-
Notifications
You must be signed in to change notification settings - Fork 302
Description
Make sure you're doing the following
- You're using the latest build for your server version
- This isn't an issue caused by another plugin
- You've checked for duplicate issues
- 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