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.

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;

Erweiterte Event-Schnittellen

Link to erweiterte-event-schnittellen

Command event implements the following interfaces:

ZenGetter/ZenSetter

Link to zengetterzensetter

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

ZenGetterZenSetterType
ZenGetter
commandSender
ZenSetter
no
Type
ICommandSender
ZenGetter
command
ZenSetter
no
Type
ICommand
ZenGetter
parameters
ZenSetter
parameters
Type
string array