TechnicallyCoded / Inventory-Rollback-Plus

Spigot/Bukkit plugin that allows server moderators to restore player items and data from backups.
https://www.spigotmc.org/resources/85811/
Other
66 stars 44 forks source link

Feature Request: Folia Support for IRP? #123

Open Agaloth opened 1 year ago

Agaloth commented 1 year ago

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.

TechnicallyCoded commented 1 year ago

Thank you for this suggestion! (I also appreciate that you disclosed the use of ChatGPT, I love when people use it responsibly like this ^^)

I am aware of the recent release of Folia but it will take experimentation and practice to ensure us devs know how to use this new API properly and still retain a cross-compatible for the average spigot user. Probably much easier said than done.

Expect compatibility to take time to arrive for Folia but I think this is a feature suggestion that is really worth looking into in order to unlock the full potential of multithreaded Minecraft since, without developers willing to pitch in, this project will go nowehere :)

sofianedjerbi commented 1 year ago

Did a quick working Folia-compatible fork: https://github.com/KaiijuMC/Inventory-Rollback-Plus I believe that can be improved:

Otherwise it works fine. It still requires A LOT of testing. Don't know if this should be a PR.

ewof commented 2 months ago

would be awesome if this was added

TechnicallyCoded commented 2 months ago

Still planned :)

Since this is a free plugin, it is updated in my free time.. That does mean it takes a low priority of "I'm so bored, let me pick a project I want to work on". That only happens about 2-3 times a month and I have many projects to pick from. =p