Skip to content

Interface IArgumentSerializer

Namespace: Void.Minecraft.Commands.Brigadier.Serializers
Assembly: Void.Minecraft.dll

Converts Brigadier argument properties between objects and command-tree packet bytes.

public interface IArgumentSerializer

Methods

Deserialize(ref BufferSpan, ProtocolVersion)

Reads argument properties from a buffer.

IArgumentType Deserialize(ref BufferSpan buffer, ProtocolVersion protocolVersion)

Parameters

buffer BufferSpan

The source buffer.

protocolVersion ProtocolVersion

The source protocol version.

Returns

IArgumentType

The decoded argument type or passthrough value.

Serialize(IArgumentType, ref BufferSpan, ProtocolVersion)

Writes argument properties to a buffer.

void Serialize(IArgumentType value, ref BufferSpan buffer, ProtocolVersion protocolVersion)

Parameters

value IArgumentType

The argument type to encode.

buffer BufferSpan

The destination buffer.

protocolVersion ProtocolVersion

The target protocol version.