diff --git a/AnarchyExploitFixesFolia/src/main/java/me/moomoo/anarchyexploitfixes/commands/AnarchyExploitFixesCommand.java b/AnarchyExploitFixesFolia/src/main/java/me/moomoo/anarchyexploitfixes/commands/AnarchyExploitFixesCommand.java index 0f87d5e4..541a6f27 100755 --- a/AnarchyExploitFixesFolia/src/main/java/me/moomoo/anarchyexploitfixes/commands/AnarchyExploitFixesCommand.java +++ b/AnarchyExploitFixesFolia/src/main/java/me/moomoo/anarchyexploitfixes/commands/AnarchyExploitFixesCommand.java @@ -11,16 +11,16 @@ public interface AnarchyExploitFixesCommand { static void registerCommands() { try { CommandManager commandManager = new CommandManager(); - Set.of( + for (AnarchyExploitFixesCommand command : Set.of( new AEFCommand(), new HelpCommand(), new SayCommand(), new ToggleConnectionMsgsCommand() - ).forEach(toParse -> { - if (toParse.shouldRegister()) { - commandManager.parser().parse(toParse); + )) { + if (command.shouldRegister()) { + commandManager.parser().parse(command); } - }); + } } catch (Exception e) { AnarchyExploitFixes.getLog().severe("Failed to create command manager! - " + e.getLocalizedMessage()); AnarchyExploitFixes plugin = AnarchyExploitFixes.getInstance(); diff --git a/AnarchyExploitFixesLegacy/src/main/java/me/moomoo/anarchyexploitfixes/commands/AnarchyExploitFixesCommand.java b/AnarchyExploitFixesLegacy/src/main/java/me/moomoo/anarchyexploitfixes/commands/AnarchyExploitFixesCommand.java index 51d06d6a..18856056 100755 --- a/AnarchyExploitFixesLegacy/src/main/java/me/moomoo/anarchyexploitfixes/commands/AnarchyExploitFixesCommand.java +++ b/AnarchyExploitFixesLegacy/src/main/java/me/moomoo/anarchyexploitfixes/commands/AnarchyExploitFixesCommand.java @@ -11,16 +11,16 @@ public interface AnarchyExploitFixesCommand { static void registerCommands() { try { CommandManager commandManager = new CommandManager(); - Arrays.asList( + for (AnarchyExploitFixesCommand command : Arrays.asList( new AEFCommand(), new HelpCommand(), new SayCommand(), new ToggleConnectionMsgsCommand() - ).forEach(toParse -> { - if (toParse.shouldRegister()) { - commandManager.parser().parse(toParse); + )) { + if (command.shouldRegister()) { + commandManager.parser().parse(command); } - }); + } } catch (Exception e) { AnarchyExploitFixes.getLog().severe("Failed to create command manager! - " + e.getLocalizedMessage()); AnarchyExploitFixes plugin = AnarchyExploitFixes.getInstance();