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

Add Folia Support; #2012

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
Draft

Add Folia Support; #2012

wants to merge 10 commits into from

Conversation

HarvelsX
Copy link

@HarvelsX HarvelsX commented Jun 8, 2023

Adds basic support for Folia with the new scheduler system.

Requirements Checklist

  • Create an adapter interface for new schedulers and implementations.
  • Implement region-specific, entity-specific task runs.
  • Rework SchedulerReport, but currently disable it for Folia;
  • Tested: needs detailed testing.

@HarvelsX HarvelsX marked this pull request as ready for review June 9, 2023 00:05
@me4502
Copy link
Member

me4502 commented Jun 9, 2023

Does this retain Spigot support, as well as actually work given WorldEdit isn't marked as supporting Folia?

@HarvelsX
Copy link
Author

HarvelsX commented Jun 9, 2023

Spigot support

At the moment it should retains, but if Folia removes BukkitScheduler,
either reflections or a separate module will have to be used.

WorldEdit isn't marked as supporting Folia

In my case, the FastAsyncWorldEdit test build is used.

For the short test was used:

This server is running Paper version git-Paper-549 (MC: 1.19.4) (Implementing API version 1.19.4-R0.1-SNAPSHOT) (Git: bc4a664)

@Kadeluxe
Copy link

How does this handle accessing region data structures in parallel??

Copy link
Collaborator

@Joo200 Joo200 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we can add Folia support at some point however there are some missing things:

  1. WorldEdit should support Folia first. We don't support WorldEdit forks. Without Folia support for WorldEdit, WorldGuard runs in unsupported environment.
  2. I'm not happy with the removed paper-api dependency. Our suggested platform is Paper, we should use paper as dependency. Folia adds some more methods and the bukkit module should never call them directly. This requires a new folia module.

How does this handle accessing region data structures in parallel??

This should be fine, WorldGuard already supports multithreaded access. However we should double check that.

@HarvelsX
Copy link
Author

2. I'm not happy with the removed paper-api dependency. Our suggested platform is Paper, we should use paper as dependency. Folia adds some more methods and the bukkit module should never call them directly. This requires a new folia module.

Creating the same code in every plugin is not reasonable. Maybe adopting this in PaperLib would not be a bad thing.

@Anon8281
Copy link

"Exit" and "Entry" flags do not work on Folia without throwing an exception. Perhaps this is caused by the use of Player#teleport, as Folia requires you to use teleportAsync

@HarvelsX
Copy link
Author

HarvelsX commented Jul 3, 2023

@Anon8281, it's kind of based on events/

@Yomamaeatstoes

This comment was marked as spam.

@Yomamaeatstoes

This comment was marked as spam.

@Loving11ish

This comment was marked as spam.

@HarvelsX
Copy link
Author

HarvelsX commented Aug 1, 2023

@Yomamaeatstoes and @Loving11ish, fixed buggy rebase/

@HarvelsX HarvelsX requested review from wizjany and Joo200 August 1, 2023 01:03
@Yomamaeatstoes
Copy link

Yomamaeatstoes commented Aug 1, 2023

It works completely fine

Copy link
Collaborator

@Joo200 Joo200 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The MR contains some improvements for Folia however without a WorldEdit version which supports Folia I wouldn't merge this.

@Yomamaeatstoes
Copy link

It works completely fine

I have since edited this message. This works completely fine.

@Joo200 Joo200 mentioned this pull request Dec 10, 2023
@Joo200 Joo200 mentioned this pull request Jan 28, 2024
Add synchronized uninitialize handlers and mark a session uninitialized;
@HarvelsX HarvelsX marked this pull request as draft June 3, 2024 16:45
@HarvelsX
Copy link
Author

HarvelsX commented Jun 3, 2024

@Anon8281, probably fixed, but there may be other problems.

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.

8 participants