Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Folia Scheduler Support #45

Merged
merged 1 commit into from
Mar 31, 2023
Merged

Folia Scheduler Support #45

merged 1 commit into from
Mar 31, 2023

Conversation

LOOHP
Copy link
Contributor

@LOOHP LOOHP commented Mar 31, 2023

Support for Folia's new scheduling system

https://github.com/PaperMC/Folia

@Phoenix616
Copy link
Owner

Looks good, thanks! :)

@Phoenix616 Phoenix616 merged commit 14db8c0 into Phoenix616:master Mar 31, 2023
@LOOHP LOOHP deleted the folia branch March 31, 2023 21:38
@Phoenix616
Copy link
Owner

I looked a bit more into this and just wanted to make sure that you know that simply doing this doesn't make the whole library thread safe. E.g. accessing the same InventoryGui object from two different threads will still cause issues. I'm looking into this right now but I'm unsure if it's actually possible to do at all locations.

Just know that you should not be using this on Folia as it stands right now.

@LOOHP LOOHP changed the title Folia Support Folia Scheduler Support Apr 3, 2023
@LOOHP
Copy link
Contributor Author

LOOHP commented Apr 3, 2023

Thanks for notifying me and I am aware of this. I asked which thread handles custom inventory over on the Folia channel in PaperMC's discord but no one gave a definitive answer. I did some testing, and things like InventoryClickEvent are called on the clicker's regional thread. However, I am unsure what happens if two players in different ticking regions access it simultaneously.

Fortunately for my usage, every player has their own inventory GUIs and only to themselves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants