mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-11-29 21:53:42 +01:00
Try to fix npe in gui Bank Selector
This commit is contained in:
parent
e45296251c
commit
3fabd75aab
@ -141,7 +141,11 @@ public class GuiBankSelector extends Gui {
|
|||||||
|
|
||||||
double amount;
|
double amount;
|
||||||
try {
|
try {
|
||||||
|
if(gui.getInputText() != null) {
|
||||||
amount = Double.parseDouble(gui.getInputText().trim());
|
amount = Double.parseDouble(gui.getInputText().trim());
|
||||||
|
} else {
|
||||||
|
amount = 0;
|
||||||
|
}
|
||||||
} catch (NumberFormatException e1) {
|
} catch (NumberFormatException e1) {
|
||||||
messageManager.sendMessage(e.player, languageLoad.getString("Command.Island.Bank.Short4.Message"));
|
messageManager.sendMessage(e.player, languageLoad.getString("Command.Island.Bank.Short4.Message"));
|
||||||
soundManager.playSound(event.player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1f, 1f);
|
soundManager.playSound(event.player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1f, 1f);
|
||||||
|
Loading…
Reference in New Issue
Block a user