The Command Event is fired whenever a command is executed. You can react to the command by providing a command handler. See Crafttweaker examples for an example.

Класс события

Link to класс-события

You will need to cast the event in the function header as this class: crafttweaker.event.CommandEvent. It is advised to import the class

Copy
import crafttweaker.event.CommandEvent;

Наследование от интерфейсов событий

Link to наследование-от-интерфейсов-событий

Command event implements the following interfaces:

Геттеры/сеттеры

Link to геттерысеттеры

The following information ca be retrieved/set during the event:

ZenGetterZenSetterТип
ZenGetter
commandSender
ZenSetter
no
Тип
ICommandSender
ZenGetter
command
ZenSetter
no
Тип
ICommand
ZenGetter
parameters
ZenSetter
parameters
Тип
string array