Skip to content

Commit

Permalink
Fix wrong substring index
Browse files Browse the repository at this point in the history
  • Loading branch information
lscgh committed Jan 25, 2024
1 parent f64c89f commit a481259
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public boolean onCommand(CommandSender sender, Command command, String label, St
sender.sendMessage(ChatColor.RED + e.getMessage() + ChatColor.RESET);
return true;
} catch(NumberFormatException e) {
String nonNumberString = e.getMessage().substring(19, e.getMessage().length() - 2);
String nonNumberString = e.getMessage().substring(19, e.getMessage().length() - 1);
sender.sendMessage(ChatColor.RED + "Error: expected number at '" + nonNumberString + "'" + ChatColor.RESET);
return true;
}
Expand Down

0 comments on commit a481259

Please sign in to comment.