Skip to content
Utility for using Minecraft's 1.13 'brigadier' library in Bukkit plugins
Branch: master
Clone or download
Latest commit 06a1de2 Jun 3, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/main/java/me/lucko/commodore Formatting fixes Jun 3, 2019
.gitignore Initial commit Jul 19, 2018
LICENSE.txt Initial commit Jul 19, 2018 Update Jan 7, 2019
pom.xml Update brigadier to latest version Apr 23, 2019

commodore Javadocs Maven Central

Utility for using Minecraft's 1.13 'brigadier' library in Bukkit plugins.


This guide assumes your plugin is built using Maven. The steps will be similar for Gradle though.

1) Configure your build script to shade commodore into your plugin jar

You need to add (or merge) the following sections into your pom.xml file.

                                <!-- vvv Replace with the package of your plugin vvv -->



2) Setup commodore in your plugin

package me.lucko.example;

import com.mojang.brigadier.arguments.BoolArgumentType;
import com.mojang.brigadier.arguments.StringArgumentType;
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
import com.mojang.brigadier.builder.RequiredArgumentBuilder;

import me.lucko.commodore.Commodore;
import me.lucko.commodore.CommodoreProvider;

import org.bukkit.command.PluginCommand;

public class TestPlugin extends JavaPlugin {

    public void onEnable() {

        // register your command executor as normal.
        PluginCommand command = getCommand("mycommand");
        command.setExecutor(new MyCommandExecutor());

        // check if brigadier is supported
        if (CommodoreProvider.isSupported()) {
            // get a commodore instance
            Commodore commodore = CommodoreProvider.getCommodore(this);

            // register your completions.
            registerCompletions(commodore, command);
    // You will need to put this method inside another class to prevent classloading
    // errors when your plugin loads on pre 1.13 versions.
    private static void registerCompletions(Commodore commodore, PluginCommand command) {
        commodore.register(command, LiteralArgumentBuilder.literal("mycommand")
                .then(RequiredArgumentBuilder.argument("some-argument", StringArgumentType.string()))
                .then(RequiredArgumentBuilder.argument("some-other-argument", BoolArgumentType.bool()))

The com.mojang.brigadier packages will be automatically imported into your classpath when you add the commodore dependency, but they should not be shaded into your plugins jar file.

You can’t perform that action at this time.