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

Feature: Add Folia Support #243

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

Quagington
Copy link

This change introduces a library called FoliaLib that allows this plugin to run on both Folia and Spigot/Paper. This library includes methods to replace scheduling calls.

Most of the changes in this PR are agnostic inline scheduler call replacements. However, for uses of BukkitRunnable a more intensive refactor was required as there is not an equivalent in Folia/FoliaLib.

@LOOHP
Copy link
Owner

LOOHP commented Dec 13, 2024

I'm not sure if just replacing all the schedulers would work, as there isn't a main thread anymore. Some calls depend on or must be done on the main thread, so those ones might be a bit more difficult to get right on Folia.

@Quagington
Copy link
Author

I'm not sure if just replacing all the schedulers would work, as there isn't a main thread anymore. Some calls depend on or must be done on the main thread, so those ones might be a bit more difficult to get right on Folia.

image

There still is the concept of a "Global" scheduler. For other things that would modify inventories, entities, etc. those would need to be done at a specific location and I tried to account for that in the PR. I recognize that there is heavy testing overhead with this PR and would be happy to assist however I can.

Many servers are moving to Folia and many plugins are adding support. Would love to help out but if not it's totally up to you. Cheers.

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