Skip to content

Basic Folia Support#2259

Merged
me4502 merged 6 commits intoEngineHub:version/7.0.xfrom
Euphillya:features/folia-support
Mar 16, 2026
Merged

Basic Folia Support#2259
me4502 merged 6 commits intoEngineHub:version/7.0.xfrom
Euphillya:features/folia-support

Conversation

@Euphillya
Copy link
Copy Markdown
Contributor

@Euphillya Euphillya commented Mar 5, 2026

Following the basic Folia support for WorldEdit, this PR adds basic Folia support.
Some testing still needs to be done.

@Euphillya Euphillya marked this pull request as ready for review March 5, 2026 22:38
Copy link
Copy Markdown
Member

@me4502 me4502 left a comment

Choose a reason for hiding this comment

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

Thanks for this. It appears to mostly follow along with the same goals from the WorldEdit Folia support.

I've left a few comments on some parts that I feel would be worth cleaning up

@Euphillya Euphillya requested a review from me4502 March 7, 2026 09:09
@Euphillya
Copy link
Copy Markdown
Contributor Author

That should be good, I also took the liberty of removing duplicates for event.getFrom() and event.getTo() in the WorldGuardVehicleListener.

vehicle.teleport(override.clone());
Location vehicleTeleportLocation = override.clone();
if (getPlugin().isFolia()) {
PaperLib.teleportAsync(vehicle, vehicleTeleportLocation);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I don't think there is a reason to use PaperLib only for folia. Imo we could always use PaperLib which provides fallback stuff for spigot.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The potential problem would be that there could be a desynchronization between several teleportations on the Paper or Bukkit servers, which are currently a synchronous call
An issue has been created for WorldEdit regarding an API; if we know it won't cause any problems, I can merge using PaperLib for Bukkit like Folia.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I feel for now, it's better to just do minimal changes for Folia support. We can do better testing as to whatever async teleports work well on Paper later, but I feel that part is out of scope for this PR

Copy link
Copy Markdown
Member

@me4502 me4502 left a comment

Choose a reason for hiding this comment

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

Thanks for this, overall IMO these changes are a good basis for Folia support in WorldGuard.

Comment thread gradle/libs.versions.toml Outdated
@@ -1,5 +1,5 @@
[versions]
worldedit = "7.3.18"
worldedit = "7.4.1-SNAPSHOT"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this actually using anything from the new WorldEdit release? Generally we try to not target snapshots (if it's using something from 7.4, building against 7.4.0 would be preferred)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I simply forgot to change it back to how it was before, because I originally wanted to use WorldEditPlugin#isFolia but it's protected.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Would you be able to please revert that change then? Also possibly the bstats one below, unless that version bump is related to Folia support in some way

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It's been reverted to the previous state.
And for Bstats, the version upgrade includes Folia support.

@me4502 me4502 merged commit 88db0e5 into EngineHub:version/7.0.x Mar 16, 2026
@Euphillya Euphillya deleted the features/folia-support branch March 20, 2026 11:20
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.

3 participants