mirror of
https://github.com/Zrips/Jobs.git
synced 2025-01-02 14:29:07 +01:00
Async economy should be async...
This commit is contained in:
parent
b35bdd5087
commit
c4dfa50a16
@ -41,8 +41,7 @@ public class BufferedPaymentTask implements Runnable {
|
||||
double money = payment.get(CurrencyType.MONEY);
|
||||
if (money > 0) {
|
||||
if (Jobs.getGCManager().isEconomyAsync()) {
|
||||
org.bukkit.Bukkit.getScheduler().scheduleSyncDelayedTask(bufferedEconomy.getPlugin(), () ->
|
||||
economy.depositPlayer(payment.getOfflinePlayer(), money));
|
||||
org.bukkit.Bukkit.getScheduler().runTaskAsynchronously(bufferedEconomy.getPlugin(), () -> economy.depositPlayer(payment.getOfflinePlayer(), money));
|
||||
} else {
|
||||
economy.depositPlayer(payment.getOfflinePlayer(), money);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user