Quick fix + API Fixes + Actually give offline interest.
Now actually gives offline interest. Don't worry, any given before this is still held in the database.
API fixes
Added methods to API:
Code (Text):
getOfflineMoney(String uuid)
setOfflineMoney(String uuid, double d)
getOfflineExp(String uuid)
setOfflineExp(String uuid, double d)
addAsyncRunner(Runner r)
All self explanatory except for addAsyncRunner which adds an async runnable you have to extend the runner and requires a Players instance which you can get from PlayerManager.getInstance().getPlayer(String uuid).
Also added events that actually work:
Code (Text):
PlayersPreLoadEvent
PlayersLoadEvent
PlayersPreSaveEvent
PlayersSaveEvent
Care with these as event.getPlayer() can be null (converting or loading from admin view) but getPlayers will always return an instance. Also care on the save events as they can be called from modifying the bank (items/exp/money) if enabled in config, make sure to use .getUnlock() which if true means that player is/has left the server.