Skip to main content

@Execute

The @Execute Annotation is used to define the method that should be called when the command is executed. All parameters of this method need to be annotated with the appropriate annotations to be injected by the command dispatcher.

Available Parameter Types​

The following parameter types can be used in execution methods

Boolean / boolean​

They require a @Bool Annotation.

Double / double​

They require a @DoubleNumber Annotation.

Float / float​

They require a @FloatNumber Annotation.

Integer / int​

They require a @IntegerNumber Annotation.

Long / long​

They require a @LongNumber Annotation.

String​

They require a @Text Annotation.

CommandSourceStack / CommandSource / ServerPlayer​

They require a @Sender Annotation.

Enum​

They require a @Enum Annotation.

Literal​

They require a @Literal Annotation.