Vault

Vault

7M Downloads

1.14 Spigot bug with TimeTaxes plugin

Totten98 opened this issue ยท 1 comments

commented

Hi,
I already contacted the plugin author and he told me that the error that I'm getting is caused by vault.
Here's the error:

[06:02:22] [Craft Scheduler Thread - 5/INFO]: [TimeTaxes] Performing Test Tax...
[06:02:22] [Craft Scheduler Thread - 5/WARN]: [TimeTaxes] Plugin TimeTaxes v1.1 generated an exception while executing task 11
java.lang.IllegalStateException: UserBalanceUpdateEvent cannot be triggered asynchronously from another thread.
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:502) ~[spigot.jar:git-Spigot-1eece4f-8ddb94d]
at com.earth2me.essentials.User.setMoney(User.java:429) ~[?:?]
at com.earth2me.essentials.api.Economy.setMoney(Economy.java:147) ~[?:?]
at com.earth2me.essentials.api.Economy.substract(Economy.java:198) ~[?:?]
at com.earth2me.essentials.api.Economy.subtract(Economy.java:190) ~[?:?]
at net.milkbowl.vault.economy.plugins.Economy_Essentials.withdrawPlayer(Economy_Essentials.java:107) ~[?:?]
at net.milkbowl.vault.economy.AbstractEconomy.withdrawPlayer(AbstractEconomy.java:40) ~[?:?]
at hazae41.minecraft.timetaxes.Plugin.withdraw(Main.kt:117) ~[?:?]
at hazae41.minecraft.timetaxes.Plugin$schedule$$inlined$also$lambda$1.invoke(Main.kt:142) ~[?:?]
at hazae41.minecraft.timetaxes.Plugin$schedule$$inlined$also$lambda$1.invoke(Main.kt:48) ~[?:?]
at mc-timetaxes.hazae41.minecraft.kotlin.bukkit.Kotlin4Bukkit__CoreKt$schedule$1$2.run(Core.kt:66) ~[?:?]
at org.bukkit.craftbukkit.v1_14_R1.scheduler.CraftTask.run(CraftTask.java:81) ~[spigot.jar:git-Spigot-1eece4f-8ddb94d]
at org.bukkit.craftbukkit.v1_14_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) [spigot.jar:git-Spigot-1eece4f-8ddb94d]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]

Can you guys confirm that the error is caused by vault and in that case fix it?

Thanks, Totten98.

P.S.: Sorry for bad english

commented

This is not caused by Vault. timetaxes needs to make sure it doesn't schedule tasks to manipulate money asynchronously. Vault doesn't make any gaurantee that the underlying economy implementation can handle concurrent calls.