added removePlayer and got rid of the Person datatype as it was stupid
This commit is contained in:
parent
f475fce63d
commit
45e0697695
1 changed files with 32 additions and 31 deletions
63
Messages.md
63
Messages.md
|
@ -39,29 +39,6 @@ we encode UUID as Strings of the following form:
|
||||||
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
||||||
Where every x represents a character between 0 and f.
|
Where every x represents a character between 0 and f.
|
||||||
|
|
||||||
#### Player
|
|
||||||
A Player is either an UnknownPlayer or a KnownPlayer. Aka `<Player>`
|
|
||||||
is a synonym for `<KnownPlayer> | <UnknownPlayer>`. As a client you
|
|
||||||
will never generate UUIDs for Player. This is always the job of the Server.
|
|
||||||
|
|
||||||
##### KnownPlayer
|
|
||||||
```
|
|
||||||
{
|
|
||||||
"playerUUID" : <UUID>
|
|
||||||
"playerName" : <Maybe String>
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
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" : <Maybe null>
|
|
||||||
"playerName" : <String>
|
|
||||||
}
|
|
||||||
```
|
|
||||||
Remark: `<Maybe null>` allows you to optionally include this field with a `null` value. But
|
Remark: `<Maybe null>` allows you to optionally include this field with a `null` value. But
|
||||||
you might omit it.
|
you might omit it.
|
||||||
|
|
||||||
|
@ -74,13 +51,13 @@ for a TickLeiste. But we still have to versions of TickLeiste.
|
||||||
#### KnownTickLieste
|
#### KnownTickLieste
|
||||||
|
|
||||||
```
|
```
|
||||||
[(<Tick>,[<KnownPlayer>])]
|
[(<Tick>,[(<UUID>,<String>)])]
|
||||||
```
|
```
|
||||||
These are mainly used to communicate existing TickLeisten from the server to the client
|
These are mainly used to communicate existing TickLeisten from the server to the client
|
||||||
|
|
||||||
#### UnknownTickLeiste
|
#### UnknownTickLeiste
|
||||||
```
|
```
|
||||||
[(<Tick>,[<UnknownPlayer>])]
|
[(<Tick>,[<String>])]
|
||||||
```
|
```
|
||||||
These are mainly used so the client can initialize a TickLeiste.
|
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",
|
"requestType" : "SetPlayerTickR",
|
||||||
"player" : <KnownPlayer>
|
"playerUUID" : <UUID>,
|
||||||
"tick" : <Tick>
|
"tick" : <Tick>
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### AddPlayerTickR
|
### AddPlayerTickR
|
||||||
|
This request adds a new player to a Tick.
|
||||||
|
|
||||||
```
|
```
|
||||||
"requestType" : "AddPlayerTickR",
|
"requestType" : "AddPlayerTickR",
|
||||||
"player" : <UnknownPlayer>
|
"player" : <UnknownPlayer>,
|
||||||
"tick" : <Tick>
|
"tick" : <Tick>
|
||||||
```
|
```
|
||||||
### InitializeTickLeisteR
|
### InitializeTickLeisteR
|
||||||
|
@ -136,11 +115,20 @@ This is used to change the name of a Player without moving them.
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
"requestType" : "ChangeNameR",
|
"requestType" : "ChangeNameR",
|
||||||
"player" : <KnownPlayer>
|
"playerUUID" : <UUID>,
|
||||||
|
"playerName" : <String>
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
If you don't set the name in KnownPlayer no name change will occur.
|
If you don't set the name in KnownPlayer no name change will occur.
|
||||||
|
|
||||||
|
### RemovePlayerR
|
||||||
|
```
|
||||||
|
{
|
||||||
|
"requestType" : "RemovePlayerR"
|
||||||
|
"playerUUID" : <UUID>
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
## Events
|
## Events
|
||||||
A Server might Send the following Events to a client.
|
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",
|
"eventType" : "SetPlayerTickE",
|
||||||
"player" : <KnownPlayer>
|
"playerUUID" : <UUID>,
|
||||||
"tick" : <Tick>
|
"tick" : <Tick>
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### AddPlayerTickE
|
||||||
|
```
|
||||||
|
"eventType" : "AddPlayerTickE",
|
||||||
|
"playerUUID" : <UUID>,
|
||||||
|
"playerName" : <String>
|
||||||
|
```
|
||||||
### InitializeTickLeisteE
|
### InitializeTickLeisteE
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
|
@ -164,8 +158,15 @@ A Server might Send the following Events to a client.
|
||||||
### ChangeNameE
|
### ChangeNameE
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
"eventType" : "ChangeNameE"
|
"eventType" : "ChangeNameE",
|
||||||
"player" : <KnownPlayer>
|
"playerUUID" : <UUID>,
|
||||||
|
"playerName" : <String>
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### RemovePlayerR
|
||||||
|
```
|
||||||
|
"eventType" : "RemovePlayerE",
|
||||||
|
"playerUUID" : <UUID>
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue