bob
This commit is contained in:
21
src/main/java/cc/fascinated/command/CommandManager.java
Normal file
21
src/main/java/cc/fascinated/command/CommandManager.java
Normal 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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user