SixTwentyDOCS

Command Module

How to use the Mineplex Studio Command Module.

This is an archived Mineplex-era document, kept for reference during the transition. It may contain outdated branding and is not part of the core SixTwenty documentation.
View the Java SDK reference

The Command Module is one of the built-in Studio Modules that allows you to dynamically register and unregister commands from the Bukkit CommandMap.

Examples

Registering Command

Let's say we want to register our new command!

public void register() {
   Command command = new MyCommand();
   commandModule.register("fallbackPrefix", command);
}

Unregistering Command

Lets unregister our command!

public void cleanup(final Player player) {
   // Pass the command instance we have created earlier.
   commandModule.unregister(command);
}