Fix edit sub command for usage without amount

This commit is contained in:
Eric 2020-03-22 00:01:17 +01:00
parent d1d6329efb
commit 9cf9d57c91

View File

@ -82,6 +82,7 @@ public class EditSubCommand extends SubCommand {
} }
int amount = -1; int amount = -1;
if (amountArgs.size() > 0) {
try { try {
amount = Integer.parseInt(amountArgs.get(0).split("=")[1]); amount = Integer.parseInt(amountArgs.get(0).split("=")[1]);
if (amount <= 0) throw new NumberFormatException(); if (amount <= 0) throw new NumberFormatException();
@ -89,6 +90,7 @@ public class EditSubCommand extends SubCommand {
sender.sendMessage("§cThe amount you entered is not valid."); // i18n sender.sendMessage("§cThe amount you entered is not valid."); // i18n
return; return;
} }
}
double buyPrice = -1; double buyPrice = -1;
if (buyPriceArgs.size() > 0) { if (buyPriceArgs.size() > 0) {