Annotation Interface OnClientCommand
Registers the method with
Events.onMain(Class, Consumer) for the ClientCommandEvents of one
module, and optionally one command. The method has one parameter, a ClientCommandEvent;
otherwise the rules of Events.register(Object) apply, and the method carries none of
the other listener annotations.
@OnClientCommand(module = "Shop", command = "buy", cancel = true)
void buy(ClientCommandEvent event) { ... }
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional Elements
-
Element Details
-
module
String moduleThe Lua module, matched exactly; not blank. -
command
-
cancel
boolean cancelCancels the event before the method runs, so Lua'sOnClientCommanddoes not receive the command, also when the method throws.- Default:
false
-