From 24973518ea127935b34a263043e7cbc0bccac4c2 Mon Sep 17 00:00:00 2001 From: ChomeNS <95471003+ChomeNS@users.noreply.github.com> Date: Sat, 5 Aug 2023 18:04:51 +0700 Subject: [PATCH] nothing just nothing --- .../plugins/CommandHandlerPlugin.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/CommandHandlerPlugin.java b/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/CommandHandlerPlugin.java index bdf438d..c23fd2b 100644 --- a/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/CommandHandlerPlugin.java +++ b/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/CommandHandlerPlugin.java @@ -17,12 +17,8 @@ import java.util.List; import java.util.concurrent.TimeUnit; public class CommandHandlerPlugin { - private final Bot bot; - public static final List 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 (