Skip to content

Commit

Permalink
Bug fix - no island.
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Oct 18, 2020
1 parent 74443ae commit c4156eb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/world/bentobox/bank/BankManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public CompletableFuture<BankResponse> withdraw(User user, double amount, World
return CompletableFuture.completedFuture(BankResponse.FAILURE_NO_ISLAND);
}

BankAccounts account = new BankAccounts();
BankAccounts account;
if (!handler.objectExists(island.getUniqueId())) {
// No account = no balance
return CompletableFuture.completedFuture(BankResponse.FAILURE_LOW_BALANCE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public boolean canExecute(User user, String label, List<String> args) {
island = getIslands().getIsland(getWorld(), user);
if (island == null) {
user.sendMessage("general.errors.no-island");
return false;
}
// Check flag
if (!island.isAllowed(user, Bank.BANK_ACCESS)) {
Expand Down

0 comments on commit c4156eb

Please sign in to comment.