diff --git a/Messages.md b/Messages.md index f0908b7..5ac577e 100644 --- a/Messages.md +++ b/Messages.md @@ -39,29 +39,6 @@ we encode UUID as Strings of the following form: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" Where every x represents a character between 0 and f. -#### Player -A Player is either an UnknownPlayer or a KnownPlayer. Aka `` -is a synonym for ` | `. As a client you -will never generate UUIDs for Player. This is always the job of the Server. - -##### KnownPlayer -``` -{ -"playerUUID" : -"playerName" : -} -``` - -If `"PlayerName"` is set, the Player has a new Name. The Server will always use KnownPlayer. If -you don't know that Player you should add it. - -##### UnknownPlayer -``` -{ -"playerUUID" : -"playerName" : -} -``` Remark: `` allows you to optionally include this field with a `null` value. But you might omit it. @@ -74,13 +51,13 @@ for a TickLeiste. But we still have to versions of TickLeiste. #### KnownTickLieste ``` -[(,[])] +[(,[(,)])] ``` These are mainly used to communicate existing TickLeisten from the server to the client #### UnknownTickLeiste ``` -[(,[])] +[(,[])] ``` These are mainly used so the client can initialize a TickLeiste. @@ -97,15 +74,17 @@ This request is used to set a player to a specific Tick. ``` { "requestType" : "SetPlayerTickR", -"player" : +"playerUUID" : , "tick" : } ``` ### AddPlayerTickR +This request adds a new player to a Tick. + ``` "requestType" : "AddPlayerTickR", -"player" : +"player" : , "tick" : ``` ### InitializeTickLeisteR @@ -136,11 +115,20 @@ This is used to change the name of a Player without moving them. ``` { "requestType" : "ChangeNameR", -"player" : +"playerUUID" : , +"playerName" : } ``` If you don't set the name in KnownPlayer no name change will occur. +### RemovePlayerR +``` +{ +"requestType" : "RemovePlayerR" +"playerUUID" : +} +``` + ## Events A Server might Send the following Events to a client. @@ -148,11 +136,17 @@ A Server might Send the following Events to a client. ``` { "eventType" : "SetPlayerTickE", -"player" : +"playerUUID" : , "tick" : } ``` +### AddPlayerTickE +``` +"eventType" : "AddPlayerTickE", +"playerUUID" : , +"playerName" : +``` ### InitializeTickLeisteE ``` { @@ -164,8 +158,15 @@ A Server might Send the following Events to a client. ### ChangeNameE ``` { -"eventType" : "ChangeNameE" -"player" : +"eventType" : "ChangeNameE", +"playerUUID" : , +"playerName" : } ``` +### RemovePlayerR +``` +"eventType" : "RemovePlayerE", +"playerUUID" : +} +```