Creating a command

Creating and registering a command to the server.‌

Creating the command

To create a command with automatic tab-completion arguments:

new FluidCommand(COMMAND) {
    @Override
    public boolean run(CommandSender sender, Command cmd, String[] args) {
        //RUN SOMETHING
        return VALID;
    }
}.addTabArguments(Map.of(ARG1, INDEX1 ...));

Note: You still need to add the command to your plugin.yml file

Last updated

Was this helpful?