Files
legacy-version/legacyver/legacypacket/update_abilities.go
2025-02-13 10:42:17 +07:00

24 lines
785 B
Go

package legacypacket
import (
"github.com/akmalfairuz/legacy-version/legacyver/proto"
"github.com/sandertv/gophertunnel/minecraft/protocol"
"github.com/sandertv/gophertunnel/minecraft/protocol/packet"
)
// UpdateAbilities is a packet sent from the server to the client to update the abilities of the player. It, along with
// the UpdateAdventureSettings packet, are replacements of the AdventureSettings packet since v1.19.10.
type UpdateAbilities struct {
// AbilityData represents various data about the abilities of a player, such as ability layers or permissions.
AbilityData proto.AbilityData
}
// ID ...
func (*UpdateAbilities) ID() uint32 {
return packet.IDUpdateAbilities
}
func (pk *UpdateAbilities) Marshal(io protocol.IO) {
protocol.Single(io, &pk.AbilityData)
}