pavog/craftconomy3

EconomyChangeEvent cannot be triggered asynchronously from another thread

Closed this issue · 13 comments

On 1.14 the events are strictly sync or async and Towny seems to withdraw money asynchronously when a new day arrives.

I haven't tested everything out but this seems to be the only very visible issue with 1.14 so far and could be solved either by making the event async when needed or calling it on the main thread.

pavog commented

Thank you for reporting this issue.
You're right, I need to make the events async.
I think I can do so by adding super(!Bukkit.getServer().isPrimaryThread()); into my event constructors. I need to figure this out and test it but I'll ping you on any progress.

pavog commented

@NorbiPeti I've got a new version ready to test, how can I contact you?

@pavog I’ve got this issue too, is it in the latest dev build? I can try it out later today.

Your line of code fixed the issue.

pavog commented

Hey @Pet0203 thanks for testing this. I'll release a new version today so that all the others can use cc3 in their 1.14 servers.

@pavog Does that include Vault support?

pavog commented

@Pet0203 Vault should be already supported. Have you tested the Vault support with the current version? Can you tell me what does not work for you?

@pavog EssentialsX Economy doesn't sync up with Craftconomy. I have the latest build. ChestShop doesn't seem to work either,

pavog commented

@Pet0203 Yeah I know about the EssentionsX Economy issue. I'll test ChestShop tomorrow. Somehow some Vault functions seem to be broken...

@pavog It's very weird because I tried out the original craftconomy3 and it worked with EssentialsX.

pavog commented

@Pet0203 Mh ok, I'll take a look at it in the next days...

Perfect, is it possible to contact you over discord? Bachja#8600 if you can add me.

pavog commented

I added super(!Bukkit.getServer().isPrimaryThread()); in 3.5.2 so this should work now.
If you still need any support with EssentialsX please open another issue.