Latest version of WorldGuard is not Folia supported.
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
Research direction
Start with BukkitRegionContainer.initialize at the reported BukkitRegionContainer.java:107 call to scheduleSyncRepeatingTask, then trace how WorldGuard schedules its repeating task and check Folia's region scheduling APIs. Reproduce startup on Folia or Canvas and identify a compatible scheduling path; done when WorldGuard initializes without the reported unsupported-operation error and its repeating task behaves correctly.
Written by the indexing model from the issue text.
Description
WorldEdit Version
FAWE (please ignore the checkbox since the issue is not related to FAWE)
WorldGuard Version
WorldGuard (7.0.21+2424-da30a99)
Platform Version
Canvas 26.3-990
Confirmations
- I am using the most recent Minecraft release.
- I am using a version of WorldEdit compatible with my Minecraft version.
- I am using a version of WorldGuard compatible with my Minecraft version.
- I am using the latest or recommended version of my platform software.
- I am NOT using a hybrid server, e.g. a server that combines Bukkit and Forge. Examples include Arclight, Mohist, and Cardboard.
- I am NOT using a fork of WorldEdit, such as FastAsyncWorldEdit (FAWE) or AsyncWorldEdit (AWE)
Bug Description
The latest version of WorldGuard is not supported on Folia/CanvasMC, however on Modrinth it is clearly stated that it is Folia friendly.
WorldGuard is attempting to register a global repeating sync task via the standard Bukkit CraftScheduler.runTaskTimer during initialization (BukkitRegionContainer.initialize), and Folia doesn't support that.
The previous plugin version worked perfectly fine.
[21:39:58 ERROR]: Error occurred while enabling WorldGuard v7.0.21+2424-da30a99 (Is it up to date?)
java.lang.UnsupportedOperationException: Unsupported in region threading
at org.bukkit.craftbukkit.scheduler.CraftScheduler.handle(CraftScheduler.java:517) ~[canvas-26.3.jar:26.3-990-9a31333]
at org.bukkit.craftbukkit.scheduler.CraftScheduler.runTaskTimer(CraftScheduler.java:227) ~[canvas-26.3.jar:26.3-990-9a31333]
at org.bukkit.craftbukkit.scheduler.CraftScheduler.runTaskTimer(CraftScheduler.java:209) ~[canvas-26.3.jar:26.3-990-9a31333]
at org.bukkit.craftbukkit.scheduler.CraftScheduler.scheduleSyncRepeatingTask(CraftScheduler.java:204) ~[canvas-26.3.jar:26.3-990-9a31333]
at worldguard-bukkit-7.0.21.jar//com.sk89q.worldguard.bukkit.BukkitRegionContainer.initialize(BukkitRegionContainer.java:107) ~[?:?]
at worldguard-bukkit-7.0.21.jar//com.sk89q.worldguard.bukkit.BukkitWorldGuardPlatform.load(BukkitWorldGuardPlatform.java:143) ~[?:?]
at worldguard-bukkit-7.0.21.jar//com.sk89q.worldguard.WorldGuard.setup(WorldGuard.java:91) ~[?:?]
at worldguard-bukkit-7.0.21.jar//com.sk89q.worldguard.bukkit.WorldGuardPlugin.onEnable(WorldGuardPlugin.java:158) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:280) ~[canvas-api-26.3.build.990-stable.jar:?]
at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:201) ~[canvas-26.3.jar:26.3-990-9a31333]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:109) ~[canvas-26.3.jar:26.3-990-9a31333]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:519) ~[canvas-api-26.3.build.944-alpha.jar:?]
at org.bukkit.craftbukkit.CraftServer.enablePlugin(CraftServer.java:626) ~[canvas-26.3.jar:26.3-990-9a31333]
at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:583) ~[canvas-26.3.jar:26.3-990-9a31333]
at net.minecraft.server.MinecraftServer.initPostWorld(MinecraftServer.java:648) ~[canvas-26.3.jar:26.3-990-9a31333]
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:357) ~[canvas-26.3.jar:26.3-990-9a31333]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1266) ~[canvas-26.3.jar:26.3-990-9a31333]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:291) ~[canvas-26.3.jar:26.3-990-9a31333]
at java.base/java.lang.Thread.run(Thread.java:1474) ~[?:?]
Expected Behavior
WorldGuard should natively check for a multi-threaded (Folia/Canvas) environment and appropriately handle or bypass global repeating tasks during initialization, or provide explicit compatibility with Folia's asynchronous/region scheduling APIs.
Reproduction Steps
- Start up a Folia server with WorldGuard
- Wait for plugin startup
Optional WorldGuard-Report
No response
Anything Else?
No response
- Dominant language
- Java
- Stars
- 944
- Forks
- 686
- Avg merge
- 4d 7h
- Merged PRs (30d)
- 6
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from EngineHub/WorldGuard
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
EngineHub/WorldGuard#2334 ·
-
status:pending type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
EngineHub/WorldGuard#2332 ·
-
End Crystal explosion gets fully cancelled even if a small part of the explosion affects a protected areaPossibly taken @Almost10 claimed this 18 days ago. Openstatus:pending type:bug
Difficulty 3/5 Half a day Newbie friendliness 62/100
EngineHub/WorldGuard#2323 · 4 comments ·
-
status:pending type:feature-request
Difficulty 3/5 1-2 days Newbie friendliness 54/100
EngineHub/WorldGuard#2320 ·
-
status:upstream type:bug
Difficulty 4/5 3-5 days Newbie friendliness 42/100
EngineHub/WorldGuard#2314 · 6 comments ·
All issues in EngineHub/WorldGuard
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
-
RegistryExceptionHandler uses self-referencing basePackageClasses instead of a controller classOpenbug finsim-registry good-first-issue
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
status:pending type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
bug level:trivial
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
exoego/keycloak-fuhito#666 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
hammy275/immersive-mc#669 ·