Skip to content

Class DynamicCommandExceptionType

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

Creates command syntax exceptions whose messages depend on one runtime value.

public class DynamicCommandExceptionType : ICommandExceptionType

Inheritance

objectDynamicCommandExceptionType

Implements

ICommandExceptionType

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

Constructors

DynamicCommandExceptionType(Func<object, IMessage>)

Creates command syntax exceptions whose messages depend on one runtime value.

public DynamicCommandExceptionType(Func<object, IMessage> function)

Parameters

function Func<object, IMessage>

The message factory.

Methods

Create(object)

Creates an exception without input context.

public CommandSyntaxException Create(object value)

Parameters

value object

The value passed to the message factory.

Returns

CommandSyntaxException

The command syntax exception.

CreateWithContext(StringReader, object)

Creates an exception at the reader’s current cursor.

public CommandSyntaxException CreateWithContext(StringReader reader, object value)

Parameters

reader StringReader

The source and cursor to capture.

value object

The value passed to the message factory.

Returns

CommandSyntaxException

The contextual exception.