EngineHub / WorldGuard

🛡️ Protect your Minecraft server and lets players claim areas
https://enginehub.org/worldguard/
Other
820 stars 541 forks source link

Add Folia Support; #2012

Open HarvelsX opened 1 year ago

HarvelsX commented 1 year ago

Adds basic support for Folia with the new scheduler system.

Requirements Checklist

me4502 commented 1 year ago

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

HarvelsX commented 1 year ago

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 commented 1 year ago

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

HarvelsX commented 1 year ago

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 commented 1 year ago

"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 commented 1 year ago

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

Yomamaeatstoes commented 1 year ago

Could you guys provide temporary jar to test it?

Yomamaeatstoes commented 1 year ago

I am sure you guys are aware of this, but someone told me the " it was one of the build.gradle.kts files " is incompatible in this PR. Once it is fixed it will be buildable. I have a test build that someone made for me, and I don't have access to make any commits here. However, with your permission I can post the jar here.

Loving11ish commented 1 year ago

Hey folks, are you aware of the issue with one of the build.gradle.kts files that is currently preventing successful building? Thanks in advance!

HarvelsX commented 1 year ago

@Yomamaeatstoes and @Loving11ish, fixed buggy rebase/

Yomamaeatstoes commented 1 year ago

It works completely fine

Yomamaeatstoes commented 10 months ago

It works completely fine

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

HarvelsX commented 4 months ago

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