Closed spikehidden closed 1 year ago
It seems like a Dynmap-Towny issue, as it is trying to call CalculateStartBalanceEvent asynchronously.
It seems like a Dynmap-Towny issue, as it is trying to call CalculateStartBalanceEvent asynchronously.
They say it's a Gringotts issue.
Source
Should probably have a super(!Bukkit.getServer().isPrimaryThread());
added to it.
Thanks @nikosgram !
Describe the bug
I noticed the following error together with a few others that seems to be caused by Gringotts when starting the server:
Error from Log
```diff [20:59:41 WARN]: [Dynmap-Towny] Plugin Dynmap-Towny v0.94 generated an exception while executing task 248 java.lang.IllegalStateException: CalculateStartBalanceEvent may only be triggered synchronously. at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:42) ~[purpur-1.19.4.jar:git-Purpur-1976] at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126) ~[purpur-1.19.4.jar:git-Purpur-1976] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:617) ~[purpur-api-1.19.4-R0.1-SNAPSHOT.jar:?] at org.gestern.gringotts.data.EBeanDAO.storeAccount(EBeanDAO.java:128) ~[gringotts-2.12.6-SNAPSHOT.jar:?] at org.gestern.gringotts.Accounting.getAccount(Accounting.java:23) ~[gringotts-2.12.6-SNAPSHOT.jar:?] at org.gestern.gringotts.api.impl.GringottsEco.account(GringottsEco.java:42) ~[gringotts-2.12.6-SNAPSHOT.jar:?] at org.gestern.gringotts.api.impl.VaultConnector.hasAccount(VaultConnector.java:71) ~[gringotts-2.12.6-SNAPSHOT.jar:?] at com.palmergames.bukkit.towny.object.economy.adapter.VaultEconomyAdapter.hasAccount(VaultEconomyAdapter.java:28) ~[Towny.jar:?] at com.palmergames.bukkit.towny.TownyEconomyHandler.checkNewAccount(TownyEconomyHandler.java:280) ~[Towny.jar:?] at com.palmergames.bukkit.towny.TownyEconomyHandler.getBalance(TownyEconomyHandler.java:154) ~[Towny.jar:?] at com.palmergames.bukkit.towny.object.economy.BankAccount.getHoldingBalance(BankAccount.java:122) ~[Towny.jar:?] at com.palmergames.bukkit.towny.object.economy.Account.getHoldingBalance(Account.java:175) ~[Towny.jar:?] at com.palmergames.bukkit.towny.object.economy.Account$CachedBalance.lambda$updateCache$0(Account.java:312) ~[Towny.jar:?] at com.palmergames.bukkit.towny.TownyEconomyHandler.lambda$static$0(TownyEconomyHandler.java:44) ~[Towny.jar:?] at com.palmergames.bukkit.towny.object.economy.Account$CachedBalance.updateCache(Account.java:312) ~[Towny.jar:?] at com.palmergames.bukkit.towny.object.economy.Account.getCachedBalance(Account.java:337) ~[Towny.jar:?] at com.palmergames.bukkit.towny.object.economy.Account.getCachedBalance(Account.java:324) ~[Towny.jar:?] at org.dynmap.towny.DynmapTownyPlugin.formatInfoWindow(DynmapTownyPlugin.java:422) ~[Dynmap-Towny.jar:?] at org.dynmap.towny.DynmapTownyPlugin.handleTown(DynmapTownyPlugin.java:615) ~[Dynmap-Towny.jar:?] at org.dynmap.towny.DynmapTownyPlugin.updateTowns(DynmapTownyPlugin.java:840) ~[Dynmap-Towny.jar:?] at org.dynmap.towny.DynmapTownyPlugin.access$0(DynmapTownyPlugin.java:834) ~[Dynmap-Towny.jar:?] at org.dynmap.towny.DynmapTownyPlugin$TownyUpdate.run(DynmapTownyPlugin.java:333) ~[Dynmap-Towny.jar:?] at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftTask.run(CraftTask.java:101) ~[purpur-1.19.4.jar:git-Purpur-1976] at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[purpur-1.19.4.jar:git-Purpur-1976] at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[purpur-1.19.4.jar:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?] at java.lang.Thread.run(Thread.java:833) ~[?:?] ```To Reproduce
Steps to reproduce the behavior:
Expected behavior
No error?
Desktop (please complete the following information):
Additional context
I also have Gringotts-Towny (2.12.5-SNAPSHOT) installed in case that makes a big difference.
Full Log: https://paste.denizenscript.com/View/113980 In the log is also a list of all plugins at the end of the file.