Skip to content

@pumpkin-plugins/upnpumpkin API / plugin / CommandHandler

Type Alias: CommandHandler ​

CommandHandler = (sender, server, args) => number

Defined in: tools/pumpkin-api/src/core.ts:51

Handles a registered command and returns its command result code.

To fail the command, throw a CommandError. The runtime converts any other thrown value into an error itself, and that conversion differs between engines.

Parameters ​

sender ​

CommandSender

server ​

Server

args ​

ConsumedArgs

Returns ​

number

pumpkin-plugins documentation