Skip to content

API reference / @jsprismarine/brigadier / CommandSyntaxException

Class: CommandSyntaxException ​

Defined in: exceptions/CommandSyntaxException.ts:198

Extends ​

Constructors ​

Constructor ​

new CommandSyntaxException(type, message, input?, cursor?): CommandSyntaxException

Defined in: exceptions/CommandSyntaxException.ts:210

Parameters ​

type ​

CommandExceptionType

message ​

Message

input? ​

string | null = null

cursor? ​

number = -1

Returns ​

CommandSyntaxException

Overrides ​

Error.constructor

Properties ​

BUILT_IN_EXCEPTIONS ​

static BUILT_IN_EXCEPTIONS: BuiltInExceptionProvider

Defined in: exceptions/CommandSyntaxException.ts:200


CONTEXT_AMOUNT ​

static CONTEXT_AMOUNT: number = 10

Defined in: exceptions/CommandSyntaxException.ts:199


ENABLE_COMMAND_STACK_TRACES ​

static ENABLE_COMMAND_STACK_TRACES: boolean = false

Defined in: exceptions/CommandSyntaxException.ts:203

Whether syntax errors include a stack for developer diagnostics. Java disables these by default.

Methods ​

getContext() ​

getContext(): string | null

Defined in: exceptions/CommandSyntaxException.ts:243

Returns ​

string | null


getCursor() ​

getCursor(): number

Defined in: exceptions/CommandSyntaxException.ts:267

Returns ​

number


getInput() ​

getInput(): string | null

Defined in: exceptions/CommandSyntaxException.ts:263

Returns ​

string | null


getMessage() ​

getMessage(): string

Defined in: exceptions/CommandSyntaxException.ts:230

Returns ​

string


getRawMessage() ​

getRawMessage(): Message

Defined in: exceptions/CommandSyntaxException.ts:239

Returns ​

Message


getType() ​

getType(): CommandExceptionType

Defined in: exceptions/CommandSyntaxException.ts:259

Returns ​

CommandExceptionType


toString() ​

toString(): string

Defined in: exceptions/CommandSyntaxException.ts:271

Returns a string representation of an object.

Returns ​

string