Command

In game command. See the Command guide

Constructor

new Command(bundle, name, def, requiredRole)

Parameters:
Name Type Default Description
bundle string

Bundle the command came from

name string

Name of the command

def object
Properties
Name Type Default Description
type CommandType CommandType.COMMAND
command function
aliases Array.<string>
usage string this.name
requiredRole PlayerRoles PlayerRoles.PLAYER
Properties:
Name Type Description
bundle string

Bundle this command came from

type CommandType
name string
func function

Actual function that gets run when the command is executed

aliases Array.<string>
usage string
requiredRole PlayerRoles

Methods

execute(args, player, arg0) → {*}

Parameters:
Name Type Description
args string

A string representing anything after the command itself from what the user typed

player Player

Player that executed the command

arg0 string

The actual command the user typed, useful when checking which alias was used for a command

Returns:
*