Fix issue with eco reset requiring 3 args (#3340)

This commit is contained in:
pop4959 2020-05-28 11:44:46 -07:00 committed by GitHub
parent d5d8c80d74
commit db729241c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,7 +36,7 @@ public class Commandeco extends EssentialsLoopCommand {
try {
cmd = Commandeco.EcoCommands.valueOf(args[0].toUpperCase(Locale.ENGLISH));
isPercent = args[2].endsWith("%");
isPercent = cmd != EcoCommands.RESET && args[2].endsWith("%");
amount = (cmd == Commandeco.EcoCommands.RESET) ? startingBalance : new BigDecimal(args[2].replaceAll("[^0-9\\.]", ""));
} catch (Exception ex) {
throw new NotEnoughArgumentsException(ex);