1
0
This commit is contained in:
Lee
2024-03-20 13:42:42 +00:00
commit e86e6258a2
20 changed files with 623 additions and 0 deletions

View File

@ -0,0 +1,21 @@
package cc.fascinated.command;
import cc.fascinated.Aetheria;
import cc.fascinated.command.impl.TotalJoinsCommand;
import org.bukkit.Bukkit;
import java.util.Objects;
public class CommandManager {
public CommandManager() {
registerCommand(new TotalJoinsCommand());
}
public static void registerCommand(Command command) {
if (command == null) {
throw new IllegalArgumentException("Command cannot be null.");
}
Objects.requireNonNull(Aetheria.INSTANCE.getCommand(command.getCommand())).setExecutor(command);
}
}