Command(bundle, name, def, requiredRole, file)

In game command. See the Command guide

new Command(bundle, name, def, requiredRole, file)

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
file string

File the command comes from

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
metadata Object

General use configuration object

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:
*