mirror of
https://github.com/Zrips/Jobs.git
synced 2025-01-21 15:41:19 +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);
|
double money = payment.get(CurrencyType.MONEY);
|
||||||
if (money > 0) {
|
if (money > 0) {
|
||||||
if (Jobs.getGCManager().isEconomyAsync()) {
|
if (Jobs.getGCManager().isEconomyAsync()) {
|
||||||
org.bukkit.Bukkit.getScheduler().scheduleSyncDelayedTask(bufferedEconomy.getPlugin(), () ->
|
org.bukkit.Bukkit.getScheduler().runTaskAsynchronously(bufferedEconomy.getPlugin(), () -> economy.depositPlayer(payment.getOfflinePlayer(), money));
|
||||||
economy.depositPlayer(payment.getOfflinePlayer(), money));
|
|
||||||
} else {
|
} else {
|
||||||
economy.depositPlayer(payment.getOfflinePlayer(), money);
|
economy.depositPlayer(payment.getOfflinePlayer(), money);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user