Skip to content

Class DynamicNCommandExceptionType

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

Creates command syntax exceptions whose messages depend on an arbitrary value array.

public class DynamicNCommandExceptionType : ICommandExceptionType

Inheritance

objectDynamicNCommandExceptionType

Implements

ICommandExceptionType

Inherited Members

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

Constructors

DynamicNCommandExceptionType(Func<object[], IMessage>)

Creates command syntax exceptions whose messages depend on an arbitrary value array.

public DynamicNCommandExceptionType(Func<object[], IMessage> function)

Parameters

function Func<object[], IMessage>

The message factory.

Methods

Create(params object[])

Creates an exception without input context.

public CommandSyntaxException Create(params object[] objects)

Parameters

objects object[]

The values passed as one array to the message factory.

Returns

CommandSyntaxException

The command syntax exception.

CreateWithContext(IImmutableStringReader, params object[])

Creates an exception at the reader’s current cursor.

public CommandSyntaxException CreateWithContext(IImmutableStringReader reader, params object[] objects)

Parameters

reader IImmutableStringReader

The source and cursor to capture.

objects object[]

The values passed as one array to the message factory.

Returns

CommandSyntaxException

The contextual exception.