Closed HatTrkPatrk closed 1 year ago
The error is not on my end.
Since Spigot 1.13 i think: "events should respect their syncronization state!"
So the econmy manipulation should be done syncronized witht he main Thread.
Anyway. I will create a workaround for these plugins that does not respect it.
The Grief Defender devs told me the error is caused by the economy plugin so I posted here. I will return to them with this then, thank you.
Also thank you for creating a workaround either way!
The error is caused because of a change on the Spigot Api!
The class: SimplePluginManager.callEvent()
On Minecraft 1.12.2 and prior this method did not check if the event passed was on the right thread.
So, an event that said "I am syncronized with the main Thread" could be called from outside the main thread.
Since 1.13*(i think is 1.13) there is a check on it, and these events are now required to be called on the correct Thread!
FinalEconomy fire an EconomyUpdateEvent, and it is suposed to be always on the main thread! And in 1.12.2 and prior there was no problem when external plugins did something wrong, because Bukkit would not care about that.
But now they do care!
Also, over several issues under the VaultAPI they state vault is not ThreadSafe.
Take a look here: https://github.com/MilkBowl/Vault/issues/514
For the economy plugin to ""Enforce a ThreadSafe"" is just a waste of processing.
I will make a release with the fix soon
In terms of a specific case that caused it, I'm using GriefDefender with FinalEconomy and the error occurs when trying to resize a claim with the golden shovel.