Skip to content

Commit

Permalink
take 2 on fixing the same issue
Browse files Browse the repository at this point in the history
  • Loading branch information
efekos committed Sep 20, 2023
1 parent ea019e4 commit f419949
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/main/java/me/efekos/simpler/commands/CoreCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,12 @@ public boolean execute(@NotNull CommandSender sender, @NotNull String commandLab
break a;
}
}

ArgumentHandleResult result = arg.handleCorrection(subArgs[i]);
if(!result.isPassed()){
sender.sendMessage(TranslateManager.translateColors(configuration.USAGE.replace("%usage%",getUsage()).replace("%reason%",result.getReason())));
break a;
if(subArgs.length-1<i&&subArgs[i]!=null){
ArgumentHandleResult result = arg.handleCorrection(subArgs[i]);
if(!result.isPassed()){
sender.sendMessage(TranslateManager.translateColors(configuration.USAGE.replace("%usage%",getUsage()).replace("%reason%",result.getReason())));
break a;
}
}
}

Expand Down Expand Up @@ -258,11 +259,12 @@ public boolean execute(@NotNull CommandSender sender, @NotNull String commandLab
break a;
}
}

ArgumentHandleResult handleResult = arg.handleCorrection(subArgs[i]);
if(!handleResult.isPassed()){
sender.sendMessage(TranslateManager.translateColors(configuration.USAGE.replace("%usage%",getUsage()).replace("%reason%",handleResult.getReason())));
break a;
if(subArgs.length-1<i&&subArgs[i]!=null){
ArgumentHandleResult result = arg.handleCorrection(subArgs[i]);
if(!result.isPassed()){
sender.sendMessage(TranslateManager.translateColors(configuration.USAGE.replace("%usage%",getUsage()).replace("%reason%",result.getReason())));
break a;
}
}
}

Expand Down

0 comments on commit f419949

Please sign in to comment.