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 Compatibility Support for BentoBox #2617

Open
2 tasks done
FemBoysAreCute opened this issue Feb 14, 2025 · 2 comments
Open
2 tasks done

Folia Compatibility Support for BentoBox #2617

FemBoysAreCute opened this issue Feb 14, 2025 · 2 comments
Labels
Status: Duplicate Related to an existing issue.

Comments

@FemBoysAreCute
Copy link

Is your feature request related to a problem?

Yes, this feature request is related to a compatibility issue.

Folia is a fork of Paper that introduces regionized multithreading, which significantly improves server performance. However, due to its different threading model, many plugins that rely on Bukkit’s synchronous behavior may not work as expected. Currently, BentoBox is not officially compatible with Folia, which prevents server owners from benefiting from its performance improvements while running BentoBox-based game modes like SkyBlock.

Adding support for Folia would ensure that BentoBox functions correctly on multithreaded servers, allowing for better scalability and performance without breaking existing functionality.

Describe the solution you'd like.

I would like BentoBox to support Folia’s regionized multithreading model while maintaining compatibility with Paper and Spigot. This could involve:

  • Replacing any synchronous Bukkit API calls that are not thread-safe with Folia-compatible alternatives, such as FoliaScheduler.
  • Ensuring that asynchronous tasks do not interact with the Bukkit API in an unsafe manner.
  • Implementing region-based handling where necessary to align with Folia’s threading model.

Ideally, BentoBox should detect if the server is running Folia and adjust its behavior accordingly, ensuring full compatibility while maintaining stability and performance.

Describe alternatives you've considered.

One alternative is running BentoBox on Paper instead of Folia. However, this means missing out on the performance benefits of Folia’s regionized multithreading, especially for large servers with many active islands.

Another option is using Folia’s compatibility layer to force BentoBox to run in a synchronous context. However, this is not a reliable solution, as it may introduce performance bottlenecks and potential threading issues.

The best approach would be native Folia support within BentoBox to ensure stability and full utilization of Folia’s improved threading model.

Agreements

  • I have searched for and ensured there isn't already an open issue regarding this.
  • I have ensured the feature I'm requesting isn't already in the latest supported BentoBox build or Addons.

Other

Folia is an experimental fork of Paper that enables true multithreading by assigning different regions of the world to separate threads. This improves performance but also requires plugins to be thread-safe.

BentoBox, as a core plugin for island-based game modes, heavily interacts with the world and entities, which may lead to issues if not properly adapted to Folia’s threading model. Supporting Folia would future-proof BentoBox and allow server owners to take advantage of better performance without sacrificing gameplay stability.

For more information on Folia and its API changes, you can check the official repository:
🔗 https://github.com/PaperMC/Folia

@tastybento
Copy link
Member

Duplicate of #2154

@tastybento tastybento marked this as a duplicate of #2154 Feb 16, 2025
@tastybento tastybento added the Status: Duplicate Related to an existing issue. label Feb 16, 2025
@tastybento
Copy link
Member

Unfortunately, world loading / custom worlds is still mentioned as "broken". If we can start to get that, then I think we could look at this again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Duplicate Related to an existing issue.
Projects
None yet
Development

No branches or pull requests

2 participants