API reference / @jsprismarine/protocol / SerializedAbilitiesData
Class: SerializedAbilitiesData
Defined in: protocol/src/structure/SerializedAbilitiesData.ts:14
The "SerializedAbilitiesData" structure carried by UpdateAbilitiesPacket and AddPlayerPacket.
Wire order: "Target Player Raw Id" int64 LE, "Player Permissions" PlayerPermissionLevel as int8, "Command Permissions" CommandPermissionLevel as uint8, then "Layers" as a varuint32 count followed by that many SerializedAbilityLayer entries. https://mojang.github.io/bedrock-protocol-docs/1.26.51/types/serialized-abilities-data/
Extends
Constructors
Constructor
new SerializedAbilitiesData(
targetPlayerRawId,mPlayerPermissions,mCommandPermissions,layers?):SerializedAbilitiesData
Defined in: protocol/src/structure/SerializedAbilitiesData.ts:17
Parameters
targetPlayerRawId
bigint
mPlayerPermissions
mCommandPermissions
layers?
Returns
SerializedAbilitiesData
Overrides
Properties
layers
layers:
SerializedAbilityLayer[]
Defined in: protocol/src/structure/SerializedAbilitiesData.ts:15
mCommandPermissions
mCommandPermissions:
CommandPermissionLevel
Defined in: protocol/src/structure/SerializedAbilitiesData.ts:20
mPlayerPermissions
mPlayerPermissions:
PlayerPermissionLevel
Defined in: protocol/src/structure/SerializedAbilitiesData.ts:19
targetPlayerRawId
targetPlayerRawId:
bigint
Defined in: protocol/src/structure/SerializedAbilitiesData.ts:18
Methods
deserialize()
deserialize(
stream):void
Defined in: protocol/src/structure/SerializedAbilitiesData.ts:37
Deserializes the network structure from a binary stream.
Parameters
stream
The binary stream to deserialize from.
Returns
void
Overrides
serialize()
serialize(
stream):void
Defined in: protocol/src/structure/SerializedAbilitiesData.ts:27
Serializes the network structure to a binary stream.
Parameters
stream
The binary stream to serialize to.
Returns
void
Overrides
deserialize()
staticdeserialize<T>(this,stream):T
Defined in: protocol/src/NetworkStructure.ts:28
Deserializes the network structure from a binary stream. The constructor runs with no arguments before the stream is read, so the class must tolerate that.
Type Parameters
T
T extends NetworkStructure
Parameters
this
Constructor<T>
stream
The binary stream to deserialize from.
Returns
T
An instance of the class T.