mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-05 20:12:54 +00:00
Fix issue with eco reset requiring 3 args (#3340)
This commit is contained in:
parent
d5d8c80d74
commit
db729241c9
1 changed files with 1 additions and 1 deletions
|
@ -36,7 +36,7 @@ public class Commandeco extends EssentialsLoopCommand {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
cmd = Commandeco.EcoCommands.valueOf(args[0].toUpperCase(Locale.ENGLISH));
|
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\\.]", ""));
|
amount = (cmd == Commandeco.EcoCommands.RESET) ? startingBalance : new BigDecimal(args[2].replaceAll("[^0-9\\.]", ""));
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
throw new NotEnoughArgumentsException(ex);
|
throw new NotEnoughArgumentsException(ex);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue