Options
All
  • Public
  • Public/Protected
  • All
Menu

Extension for InnerCore's Commands module adding custom chat commands registration API, alternative to KEX.CommandsModule, having the structure which is more convenient for JavaScript development.

since

3.0

Index

Type Aliases

Type alias listing all types of command argument description objects, that can be put into the args array in CustomCommandBuilder.addOverload.

since

3.0

BoolArgument: Argument<"bool" | "boolean", BOOL, boolean>

Type alias declaring a description object template for the command argument of boolean type.

since

3.0

EntityArgument: Argument<"entity", ENTITY, never>

Type alias declaring a description object template for the command argument of entity selector type.

since

3.0

FloatArgument: Argument<"float", FLOAT, number>

Type alias declaring a description object template for the command argument of floating point type.

since

3.0

FloatPositionArgument: Argument<"floatpos" | "floatposition", FLOAT_POSITION, Vector>

Type alias declaring a description object template for the command argument of floating point coordinates position type.

since

3.0

IntArgument: Argument<"int" | "integer", INT, number>

Type alias declaring a description object template for the command argument of integer type.

since

3.0

JsonArgument: Argument<"json", JSON, never>

Type alias declaring a description object template for the command argument of JSON object type.

since

3.0

LiteralArgument: Argument<"literal", LITERAL, never>

Type alias declaring a description object template for the command argument of literal type.

A literal is one specific word that must be written into the chat command line, like list in /tickingarea list or clear in /effect visualstudiodan clear

since

3.0

MessageArgument: Argument<"msg" | "message", MESSAGE, never>

Type alias declaring a description object template for the command argument of message type. Same as StringArgument, but must be put as a last argument of the command overload, as it'll grab all the rest of the command text to its string value.

since

3.0

PlayerArgument: Argument<"player", PLAYER, never>

Type alias declaring a description object template for the command argument of player selector type.

since

3.0

PositionArgument: Argument<"pos" | "position", POSITION, Vector>

Type alias declaring a description object template for the command argument of integer coordinates position type.

since

3.0

RelativeFloat: ((center?: number) => number)

Type declaration

    • (center?: number): number
    • Representation of relative float argument in args parameter of ExecuteCallback. It's a function that optionally takes a center value to add it to the specified floating point value, if the caller used ~ token before it.

      since

      3.0

      Parameters

      • Optional center: number

      Returns number

RelativeFloatArgument: Argument<"relfloat" | "relativefloat", RELATIVE_FLOAT, number>

Type alias declaring a description object template for the command argument of relative float type (~VALUE, where ~ is the center value you choose in your code).

since

3.0

StringArgument: Argument<"str" | "string", STRING, string>

Type alias declaring a description object template for the command argument of string type.

since

3.0

Functions

  • Initializes new custom chat command.

    since

    3.0

    Parameters

    • commandName: string

      command's name that will have to be put after a slash

    • Optional permissionLevel: number

      command's permission level, defaults to 0 (all players can use this command)

    Returns CustomCommandBuilder

    object to describe your custom chat command, and then call its register method to register the command

Generated using TypeDoc