public void giveMoney(UUID player, double amount, FinancialCallback callback) { new Thread( () -> { PlayerData data = getData(player); data.creditMoney(amount); if (callback != null) callback.done(data.getMoney(), amount); }) .start(); }
public double getAmount(UUID player) { PlayerData data = getData(player); return data.getMoney(); }