Skip to content

Commit

Permalink
Fix null-pointer issues that prevented teleportation.
Browse files Browse the repository at this point in the history
There was an issue with missing world parameter for offline players before teleportation.
This prevented to process teleportation after payment.

Fixes #24
  • Loading branch information
BONNe committed Apr 2, 2023
1 parent 145b46a commit bfc08ea
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import java.util.*;
import java.util.concurrent.CompletableFuture;

import net.milkbowl.vault.economy.EconomyResponse;
import world.bentobox.bank.BankResponse;
import world.bentobox.bank.data.Money;
import world.bentobox.bentobox.api.addons.GameModeAddon;
Expand Down Expand Up @@ -266,7 +267,7 @@ else if (bankResponse == BankResponse.SUCCESS)
else if (this.addon.getVaultHook() != null && this.addon.getVaultHook().hook())
{
// Process Vault deposit.
if (this.addon.getVaultHook().deposit(user, credits).transactionSuccess())
if (this.addon.getVaultHook().deposit(user, credits, world).transactionSuccess())
{
Utils.sendMessage(user, message);
deposit.complete(true);
Expand Down Expand Up @@ -334,7 +335,7 @@ else if (bankResponse == BankResponse.SUCCESS)
}
else if (this.addon.getVaultHook() != null && this.addon.getVaultHook().hook())
{
if (this.addon.getVaultHook().withdraw(user, credits).transactionSuccess())
if (this.addon.getVaultHook().withdraw(user, credits, world).transactionSuccess())
{
Utils.sendMessage(user, message);
// Process Vault withdraw.
Expand Down

0 comments on commit bfc08ea

Please sign in to comment.