/LegacyClientCommands

Small Library providing a client-command API, ported from Forge.

Primary LanguageJavaGNU Lesser General Public License v2.1LGPL-2.1

LegacyClientCommands

Small Library providing a client-command API, ported from Forge.

Using it in your project

Include it in your mod

repositories {
  maven {
    url "https://moehreag.duckdns.org/maven/releases"
  }
}

dependencies {
  modImplementation include('io.github.axolotlclient:LegacyClientCommands:1.0.0')
}

Registering a Command

public class YourMod implements ClientModInitializer {
    public void onIntitialize() {
        ClientCommandRegistry.getInstance().registerCommand(new ClientCommand(){
            ...
        });
    }
}

There's also a helper method available which accepts Lambdas as parameters. It is also possible to register Listeners which will be called every time a command is executed.