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 support for ProtocolLib? #2281

Open
Agaloth opened this issue Mar 30, 2023 · 6 comments
Open

Folia support for ProtocolLib? #2281

Agaloth opened this issue Mar 30, 2023 · 6 comments

Comments

@Agaloth
Copy link

Agaloth commented Mar 30, 2023

Here is the repo link: https://github.com/PaperMC/Folia

Here is a summary of everything made with ChatGPT to save some time:

For plugin developers, there are a few key takeaways from the given text:

  1. Folia introduces regionised multithreading, which means that plugins will require modification to function properly. Plugin developers should expect compatibility with existing plugins to be at zero.

  2. Folia introduces new API additions, such as the RegionisedScheduler and EntityScheduler, which can help plugins run on the correct thread context.

  3. To ensure compatibility with Folia, plugin developers must mark their plugin as compatible by placing "folia-supported: true" in the plugin.yml file. Additionally, plugins must take advantage of the RegionisedScheduler and EntityScheduler API to ensure correct behavior.

  4. Plugins should not assume that they can access or modify data in other regions, as Folia regions tick in parallel and do not share data. Plugin developers should take advantage of the upcoming thread-check API to ensure correct behavior.

  5. There are currently broken API, including the scoreboard API, and planned API changes, such as super aggressive thread checks, which may impact plugin development.

Overall, plugin developers should be prepared for significant changes in their plugins to ensure compatibility with Folia. They should take advantage of the new API additions and mark their plugin as compatible to ensure correct behavior. Additionally, they should be aware of the limitations and rules of Folia's regionised multithreading to avoid bugs and errors in their plugins.

@dmulloy2
Copy link
Owner

honestly ProtocolLib will probably at least mostly support it based on that description unless they made substantial changes to the network stack. plugins using PL may have some trouble with the threading though

@Agaloth
Copy link
Author

Agaloth commented Mar 30, 2023

I see, thanks a lot for the response. Let me know if there is anything I can do to run tests and let you guys know in that thread for any issues that appears.

@dmulloy2
Copy link
Owner

plan on giving it a try soon so i will keep this thread updated

@dmulloy2 dmulloy2 pinned this issue Mar 30, 2023
@HyCore
Copy link

HyCore commented Apr 14, 2023

current state with protocol lib on latest folia build (crash):
https://pastebin.mozilla.org/vQtuUbMw

@mani1232
Copy link

Hehe
#2346

@gavenda
Copy link

gavenda commented Jun 15, 2023

Initial Folia support (#2346) has parts that still uses BukkitScheduler:

public BukkitScheduler getScheduler() {
return scheduler;
}

This is a given since its initial support, just mentioning it.

@dmulloy2 dmulloy2 unpinned this issue Jun 3, 2024
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

No branches or pull requests

5 participants