mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-03 14:38:51 +00:00
Begin API abstraction!
This commit is contained in:
1 parent
59511c037f
commit
7299ff64a5
86 files changed
+399
-436
No files matched your search
@@ -0,0 +1,21 @@
|
||||
package net.draycia.carbon.util;
|
||||
|
||||
import dev.jorel.commandapi.CommandAPI;
|
||||
import net.draycia.carbon.api.commands.CommandSettings;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
public final class CommandUtils {
|
||||
|
||||
private CommandUtils() {
|
||||
|
||||
}
|
||||
|
||||
public static void handleDuplicateCommands(@NonNull final CommandSettings settings) {
|
||||
CommandAPI.unregister(settings.name());
|
||||
|
||||
for (final String command : settings.aliases()) {
|
||||
CommandAPI.unregister(command);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user