Skip to content

Hey there! If you like my work, you can support me by sponsoring me on GitHub. Thanks! ❤

Sponsor me
on GitHub

@Async Execution

To execute a command asynchronously, you can use the @Async annotation.

Java
@Command(name = "async-command")
public class Example {

    @Async
    @Execute
    void execute() {
        System.out.print("This message is triggered asynchronously!");
    }
}

IMPORTANT

The command will be executed in an asynchronous thread defined by scheduler.

Made by LiteDevelopers and Contributors with ❤️