nothing just nothing

This commit is contained in:
Chayapak 2023-08-05 18:04:51 +07:00
parent 2f2edece14
commit 24973518ea

View file

@ -17,12 +17,8 @@ import java.util.List;
import java.util.concurrent.TimeUnit;
public class CommandHandlerPlugin {
private final Bot bot;
public static final List<Command> commands = new ArrayList<>();
public boolean disabled = false;
static {
registerCommand(new CommandBlockCommand());
registerCommand(new CowsayCommand());
@ -58,11 +54,11 @@ public class CommandHandlerPlugin {
registerCommand(new ConsoleServerCommand());
}
private int commandPerSecond = 0;
public boolean disabled = false;
public static void registerCommand (Command command) {
commands.add(command);
}
private final Bot bot;
private int commandPerSecond = 0;
public CommandHandlerPlugin (Bot bot) {
this.bot = bot;
@ -70,6 +66,10 @@ public class CommandHandlerPlugin {
bot.executor.scheduleAtFixedRate(() -> commandPerSecond = 0, 0, 1, TimeUnit.SECONDS);
}
public static void registerCommand (Command command) {
commands.add(command);
}
// literally the same quality as the js chomens bot
// well probably less mess (mabe.,,.)
public Component executeCommand (