ProtocolVersion
LunaticChat protocol version definition
Manages version of communication protocol between Paper and Velocity.
Version Bump Rules
PATCH (e.g., 1.0.0 -> 1.0.1):
Add optional fields with default values to existing message types.
Add new sub-channels that peers can safely ignore.
No deployment coordination required.
MINOR (e.g., 1.0.x -> 1.1.0):
Add required fields to existing messages.
Add sub-channels whose absence degrades functionality.
Deployment order: update Velocity first, then Paper servers.
Set MIN_SUPPORTED_MINOR to control the deprecation window.
MAJOR (e.g., 1.x.x -> 2.0.0):
Remove or rename existing sub-channels or fields.
Change wire format or encoding.
Requires simultaneous deployment of all components.
Adding a New Message Type (sub-channel)
Add the data class to PluginMessage.
Add a sub-channel constant to PluginMessageCodec.SubChannel.
Add encode/decode branches in PluginMessageCodec.
Add a backward compatibility snapshot to ProtocolBackwardCompatibilityTest.
Bump PATCH if the new sub-channel is optional, MINOR if it is required.