Skip to content

Commit

Permalink
switch to foreach loop so AnnotationParser doesnt get confused
Browse files Browse the repository at this point in the history
  • Loading branch information
xGinko committed Jan 29, 2024
1 parent f5073b8 commit e7f451f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit e7f451f

Please sign in to comment.