Fix for npe in admin bank command

This commit is contained in:
Fabrizio La Rosa 2020-07-22 14:20:55 +02:00
parent 28a6bbe7ef
commit 9c7efdae06

View File

@ -43,7 +43,12 @@ public class AdminBank extends SubCommand {
} }
if (args.length < 1) { if (args.length < 1) {
if (island != null){
plugin.getGuiManager().showGUI(player, new GuiBank(plugin, island, null, true)); plugin.getGuiManager().showGUI(player, new GuiBank(plugin, island, null, true));
} else {
messageManager.sendMessage(player, configLoad.getString("Command.Island.Admin.Bank.NullIsland.Message"));
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1f, 1f);
}
} else { } else {
switch (args[0].toLowerCase()) { switch (args[0].toLowerCase()) {
case "balance": case "balance":