Skip to content

Autoreferee Message Protocol

caske33 edited this page Sep 19, 2013 · 3 revisions

About

The AutoReferee Message Protocol is a protocol to exchange information between the autoreferee-client mod and a server-side plugin. Currently there are two plugins supported: the main AutoReferee plugin and the TesseractUHC plugin. But if you want to build a plugin too, these messages are the things you need to implement (you don't need to implement all of them for it to work but if you don't implement some of them, some of the features of the client-side mod might not work). The messages are sent over a so called plugin channel (the channel that is used is autoref:referee).

If you want your plugin/gamemode to be supported too or you want more messages to be added, you can always message me and maybe I will implement them.

Server -> Client

Player Messages

  • player|<player>|hp|<health> - health in half-hearts
  • player|<player>|armor|<armor> - armor in half-shields
  • player|<player>|hunger|<hunger> - hunger in half-hungerbars/drumsticks
  • player|<player>|goal|+<blockdata> - player is carrying objective ( = blockid,blockdatavalue)
  • player|<player>|goal|-<blockdata> - player dropped objective ( = blockid,blockdatavalue)
  • player|<player>|kills|<num> - number of kills total
  • player|<player>|deathpos|<coords> - comma-separated coordinates for player death
  • player|<player>|deaths|<num> - number of deaths total
  • player|<player>|dominate|<name> - sent when player is dominating another player
  • player|<player>|revenge|<name> - sent when player takes revenge on another player
  • player|<player>|accuracy|<num> - accuracy as a percentage (percent sign not sent)
  • player|<player>|streak|<num> - killstreak this life (zero will be sent to reset on death)
  • player|<player>|cape|<link> - set the link to the cape of the player (the link has to be without http://)
  • player|<player>|login - set the player to be logged in
  • player|<player>|logout - set the player to be logged out (this will make him gray in the overlay)
  • player|<player>|itemcount|<itemid>,<datavalue>|<num> - sets the amount of a certain item the player has, the datavalue is optionial.
  • player|<player>|dimension|<dimension> - set the diminsion of the player: "overworld", "nether", or "end"

Team Messages

  • team|<team>|init - initialize team
  • team|<team>|destroy - remove team
  • team|<team>|name|<newname> - change team's name
  • team|<team>|color|<colorcode> - set team color code
  • team|<team>|player|+<player> - player joins team
  • team|<team>|player|-<player> - player leaves team
  • team|<team>|goal|+<blockdata> - set blockdata as an objective ( = blockid,blockdatavalue)
  • team|<team>|goal|-<blockdata> - remove blockdata as an objective ( = blockid,blockdatavalue)
  • team|<team>|goal|survive - last-team-standing rules apply (a la Bed Wars)
  • team|<team>|state|<blockdata>|<state> - update state of an objective ( = blockid,blockdatavalue)
  • none - wool is in fleecy box. This is the default state. This state will never be sent, but is assumed
  • found - fleecy box has been opened, but wool is not necessarily being carried
  • carry - a player is carrying this wool. This will revert to found if the wool is dropped.
  • vm - the wool is on the victory monument. This will revert to found or carry if the wool is removed.

Match Messages

  • match|<world>|init - initialize match
  • match|<world>|destroy - destroy match
  • match|<world>|map|<map> - map name
  • match|<world>|time|<time> - current match time (hh,mm,ss)
  • match|<world>|countdown|<sec> - number of seconds until the match begins
  • match|<world>|start - match begins
  • match|<world>|end|<team> - match ended, winning team
  • match|<world>|champions|<team> - set the current champions (for CotM)
  • match|<world>|swap - swap the HUD (left team becomes the right team and vice versa)
  • match|<world>|nightvis|<state> - toggle/sets nightvision effect for streamer. If state is omitted, it toggles, state=1 enables nightvision, state=0 disables it.
  • match|<world>|gameplay|<key>|<value> - match gameplay variation
  • expect to receive key-value pairs that are not listed below, just ignore gracefully
  • key=respawn
  • ... value=allow - normal respawn behavior
  • ... value=disallow - players are eliminated from the game when they die
  • ... value=bedsonly - players may respawn from beds, otherwise are eliminated
  • key=FFA
  • ... value=on/off - Enable/Disable FFA.

Client -> Server

Tp Messages

  • tp|player|<name>|<type> - tp to player-specific location
  • type=player - tp to player location
  • type=spawn - tp to player bed/spawn location
  • type=death - tp to last player death location
  • tp|team|<team>|<type>|<params> - tp to this team's locations
  • type=vm - tp to team's victory monument
  • type=spawn - tp to team's spawn location
  • type=obj - tp to objective described by option parameters

##Inventory Messages

  • inventory|<name>|[prev] - open player's inventory (or his predeath inventory if "prev" is passed as extra parameter).