NPE on getBalance()
Lolmewn opened this issue ยท 3 comments
Hi!
I just installed Craftconomy and updated Vault to 1.4.1. However, I'm getting this NPE while trying to get the balance of a player:
http://pastebin.com/7tYLc1ae
The code I'm using can be found on line 33: https://bitbucket.org/Lolmewn/stats/src/fb30aeef47c000b1d72d7fa837f9f8ce6bd542e8/src/main/java/nl/lolmewn/stats/compat/EconHandler.java?at=master#cl-33
nothing changed in CC3 for the update. What version did you have before? and is CC3 updated to the latest version?
Also this wont affect you right now, but you're using deprecated methods.
Also, if you just installed CC3 you have to set it up before it functions properly. If you have not set it up it will error.
Found out what it was - Stats is trying to get the balance but when you first install CC3 it doesn't init anything since there's an in-game configurator. Therefore, the player doesn't have an account - and NPE on getBalance since (I'm assuming) some account gets invoked.