API Documentation v0.0.4

Commands

COMMAND_SERVER_VERSION: 1

Client

  • Short: 1

Server

  • Short: 1
  • Standard string: Server version as reported by Bukkit

COMMAND_SERVER_ID: 2

Client

  • Short: 2

Server

  • Short: 2
  • Standard string: Server ID as reported by Bukkit

COMMAND_SERVER_NAME: 3

Client

  • Short: 3

Server

  • Short: 3
  • Standard string: Server name as reported by Bukkit

COMMAND_SERVER_HAS_WHITELIST: 4

Client

  • Short: 4

Server

  • Short: 4
  • Boolean: Whether the server has a whitelist or not

COMMAND_SERVER_PLUGIN_LIST: 5

Client

  • Short: 5

Server

  • Short: 5
  • Standard string array: List of plugin names / versions (e.g. ProjectRedstone v0.0.4)
  • Standard boolean array: List of whether said plugin is enabled or not

COMMAND_PLAYER_COUNTS 50

Client

  • Short: 50

Server

  • Short: 50
  • Standard int array (size 2): ** First: Number of players online ** Second: Maximum number of players

COMMAND_PLAYER_LIST: 51

Client

  • Short: 51

Server

  • Short: 51
  • Standard string array: List of online players

COMMAND_PING: 100

Client

  • Short: 100

Server

  • Short: 100

Notes

  • All data in little endian order
  • All strings in UTF-8

Data Types

  • Char: 2 bytes
  • Short: 2 bytes
  • Int: 4 bytes

Standard string

  • Int: String length in bytes
  • String data

Standard string array

  • Int: # of strings
  • Int x #: String lengths
  • String x #: Strings

Standard int

  • Int: Integer

Standard int array

  • Int: # of integers
  • Int x #: Integers

Standard Boolean

  • Char: 0 for false, 1 for true

Standard Boolean array

  • Int: # of Booleans
  • Boolean x #: Booleans