Skip to content

Protocol

Acrylic Style edited this page Nov 11, 2024 · 8 revisions

Introduction

⚠️ This page is a bit outdated (encryption process)

In AziPluginMessaging, the packets are communicated using plugin messages (as the plugin name indicates).

Definitions

Player

Field Name Field Type Notes
UUID String
Has Username? Boolean If false, the next field is not present.
Username String

Packets

All packets are sent encrypted except for Encryption Request (Proxybound) and Encryption Response (Serverbound).

The encryption process:

  1. Player joins the server
  2. Server generates a key pair and a challenge token
  3. S→P: Encryption Request
  4. P→S: Proxy generates a key pair, and sends Encryption Response
  5. Server validates the response, and both enable encryption

Proxybound

Encryption Request

Packet ID Bound To Field Name Field Type Notes
0x00 Proxy Challenge Token String Challenge token to respond back to the server.
Public Key String Public key of the server

Set Rank

Sets the player's current rank on the server. If the player has multiple ranks, all other ranks will be removed.

Any groups that are not in the rank track will be denied.

Packet ID Bound To Field Name Field Type Notes
0x02 Proxy Rank String Rank group name (this must be present in the `rank` track)
Target Player

Give Gaming Sara

Grants gamingsara rank to the player. This action is irreversible.

Packet ID Bound To Field Name Field Type Notes
0x03 Proxy Target Player

Give Sara

Grants (amount)sara rank to the player. This action is irreversible.

Possible values of amount (hardcoded):

  • 100
  • 500
  • 1000
  • 2000
  • 5000
  • 10000
Packet ID Bound To Field Name Field Type Notes
0x04 Proxy Amount Int See above
Target Player

Toggle Gaming Sara

Toggles whether the gamingsara should be shown.

Packet ID Bound To Field Name Field Type Notes
0x05 Proxy Target Player

Toggle Sara (Hide)

Toggles whether the sara rank should be hidden (in global).

Packet ID Bound To Field Name Field Type Notes
0x06 Proxy Target Player

Toggle Sara (Show)

Toggles whether the sara rank should be shown (in rankable servers).

Packet ID Bound To Field Name Field Type Notes
0x07 Proxy Target Player

Set Prefix

Packet ID Bound To Field Name Field Type Notes
0x08 Proxy Target Player
Global Boolean Set to true for global prefix, false for local prefix
Prefix String (New) prefix to set

Clear Prefix

Packet ID Bound To Field Name Field Type Notes
0x09 Proxy Target Player
Global Boolean Set to true for global prefix, false for local prefix
All Boolean Whether to remove ALL (including prefixes from global, other servers) prefix. When set to true, this field overrides the Global field.

Give Nitro Sara

Packet ID Bound To Field Name Field Type Notes
0x0A Proxy Target Player
Time Integer
Unit String Enum name of `java.util.concurrent.TimeUnit`

Toggle Nitro Sara

Packet ID Bound To Field Name Field Type Notes
0x0B Proxy Target Player

Check Rank Expiration

Packet ID Bound To Field Name Field Type Notes
0x0C Proxy Target Player
Rank String Only `nitro` and `changenitro` is supported at this moment.

Punish

Packet ID Bound To Field Name Field Type Notes
0x0D Proxy Target Player
Sender Player Set to null UUID (`new UUID(0, 0)`) for console
Punishment Type String One of: BAN, TEMP_BAN, IP_BAN, TEMP_IP_BAN, MUTE, TEMP_MUTE, IP_MUTE, TEMP_IP_MUTE, WARNING, CAUTION, KICK, REVERT_PUNISHMENT
Reason String
Time Integer
Temporary Boolean If false (permanent), the next field is not present.
Time Unit String java.util.concurrent.TimeUnit

Serverbound

Encryption Response

The proxy sends the response packet after the request packet was received.

Packet ID Bound To Field Name Field Type Notes
0x00 Server Challenge Token String Challenge token from Encryption Request packet. The encryption response fails if this does not match.
Public Key String Public key of the proxy.

Action Response

Sends a message to the player.

Packet ID Bound To Field Name Field Type Notes
0x02 Server UUID String UUID of the player to send message to.
Message String Legacy formatted message. Can contain section (\u00a7) character.

Check Rank Expiration

Packet ID Bound To Field Name Field Type Notes
0x03 Server UUID Player
Rank String
Expires At Long