mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-02 14:38:49 +00:00
Attempt to fix duplicate command names
This commit is contained in:
1 parent
ed3a41bcfa
commit
c8beb402a3
16 files changed
+61
No files matched your search
@@ -0,0 +1,16 @@
|
||||
package net.draycia.carbon.util;
|
||||
|
||||
import dev.jorel.commandapi.CommandAPI;
|
||||
import net.draycia.carbon.storage.CommandSettings;
|
||||
|
||||
public class CommandUtils {
|
||||
|
||||
public static void handleDuplicateCommands(CommandSettings settings) {
|
||||
CommandAPI.unregister(settings.getName());
|
||||
|
||||
for (String command : settings.getAliases()) {
|
||||
CommandAPI.unregister(command);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user