mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2025-01-25 08:51:33 +01:00
Fix bank not accepting decimals, fix ArrayIndexOutOfBoundsException
This commit is contained in:
parent
e997bb3770
commit
473d8c908e
@ -72,7 +72,13 @@ public class BankCommand extends SubCommand {
|
||||
"%balance%", String.valueOf(balance)));
|
||||
return;
|
||||
case "Deposit": {
|
||||
double amt = Long.parseLong(args[1]);
|
||||
if (args.length == 1) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Bank.Short3.Message"));
|
||||
soundManager.playSound(player, Sounds.ANVIL_LAND.bukkitSound(), 1.0F, 1.0F);
|
||||
return;
|
||||
}
|
||||
|
||||
double amt = Double.parseDouble(args[1]);
|
||||
|
||||
if (!economyManager.hasBalance(player, amt)) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Bank.Short.Message"));
|
||||
@ -86,7 +92,13 @@ public class BankCommand extends SubCommand {
|
||||
return;
|
||||
}
|
||||
case "Withdraw": {
|
||||
double amt = Long.parseLong(args[1]);
|
||||
if (args.length == 1) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Bank.Short3.Message"));
|
||||
soundManager.playSound(player, Sounds.ANVIL_LAND.bukkitSound(), 1.0F, 1.0F);
|
||||
return;
|
||||
}
|
||||
|
||||
double amt = Double.parseDouble(args[1]);
|
||||
|
||||
if (amt > balance) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Bank.Short2.Message"));
|
||||
|
@ -33,6 +33,8 @@ Command:
|
||||
Message: "&bSkyBlock &8| &cError&8: &eYou don't have enough money to do that."
|
||||
Short2:
|
||||
Message: "&bSkyBlock &8| &cError&8: &eThere is not enough money to withdraw."
|
||||
Short3:
|
||||
Message: "&bSkyBlock &8| &cError&8: &eYou did not specify an amount."
|
||||
Invalid:
|
||||
Message: "&bSkyBlock &8| &cError&8: &eInvalid: /island bank [<Deposit|Withdraw|Balance>]"
|
||||
Unlock:
|
||||
|
Loading…
Reference in New Issue
Block a user