Skip to content

Commit

Permalink
packet/start_game.go: PlayerPermissions is a varint32.
Browse files Browse the repository at this point in the history
  • Loading branch information
JustTalDevelops committed Sep 24, 2022
1 parent bb3343c commit 44eef98
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions minecraft/protocol/packet/start_game.go
Expand Up @@ -131,7 +131,7 @@ type StartGame struct {
StartWithMapEnabled bool
// PlayerPermissions is the permission level of the player. It is a value from 0-3, with 0 being visitor,
// 1 being member, 2 being operator and 3 being custom.
PlayerPermissions uint8
PlayerPermissions int32
// ServerChunkTickRadius is the radius around the player in which chunks are ticked. Most servers set this
// value to a fixed number, as it does not necessarily affect anything client-side.
ServerChunkTickRadius int32
Expand Down Expand Up @@ -268,7 +268,7 @@ func (pk *StartGame) Marshal(w *protocol.Writer) {
w.Bool(&pk.ExperimentsPreviouslyToggled)
w.Bool(&pk.BonusChestEnabled)
w.Bool(&pk.StartWithMapEnabled)
w.Uint8(&pk.PlayerPermissions)
w.Varint32(&pk.PlayerPermissions)
w.Int32(&pk.ServerChunkTickRadius)
w.Bool(&pk.HasLockedBehaviourPack)
w.Bool(&pk.HasLockedTexturePack)
Expand Down Expand Up @@ -341,7 +341,7 @@ func (pk *StartGame) Unmarshal(r *protocol.Reader) {
r.Bool(&pk.ExperimentsPreviouslyToggled)
r.Bool(&pk.BonusChestEnabled)
r.Bool(&pk.StartWithMapEnabled)
r.Uint8(&pk.PlayerPermissions)
r.Varint32(&pk.PlayerPermissions)
r.Int32(&pk.ServerChunkTickRadius)
r.Bool(&pk.HasLockedBehaviourPack)
r.Bool(&pk.HasLockedTexturePack)
Expand Down

0 comments on commit 44eef98

Please sign in to comment.