Vault

Vault

7M Downloads

Vault API - Economy Bank Deposit/Withdraw not working?

BenWoodworth opened this issue ยท 3 comments

commented

I'm having some trouble withdrawing and depositing money into players' accounts.

The amount of money in a players bank isn't being changed when I use the economy.bankDeposit and economy.bankWithdraw commands in the Vault API.

Here's my debugging in the console:

Debug code:
System.out.println(player.getName() + " " + economy.getBalance(player.getName()));
economy.bankDeposit(player.getName(), 10);
System.out.println(player.getName() + " " + economy.getBalance(player.getName()));

Console Output:
[INFO] playername 1234.0
[INFO] playername 1234.0
(money in bank didn't change)

Is this a bug, or am i doing something wrong?

More info:
i'm using the latest version of essentials eco and vault
im using the 1.4 R0.2 bukkit build

Thanks!

commented

which economy are you using?

commented

I found out the problem was that i used bankDeposit() and I needed to use depositPlayer().

commented

bank depositing is for banks.. not player accounts, so yah. glad you got it working!