CommandEvent
Link to commandevent
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.
Event Class
Link to event-class
You will need to cast the event in the function header as this class: crafttweaker.event.CommandEvent
. It is advised to import the class
Copyimport crafttweaker.event.CommandEvent;
Event interface extensions
Link to event-interface-extensions
Command event implements the following interfaces:
ZenGetters/ZenSetters
Link to zengetterszensetters
The following information ca be retrieved/set during the event:
ZenGetter | ZenSetter | Type |
---|---|---|
ZenGetter commandSender | ZenSetter no | Type ICommandSender |
ZenGetter command | ZenSetter no | Type ICommand |
ZenGetter parameters | ZenSetter parameters | Type string array |