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

command don t execute async #6

Open
ungurul opened this issue Nov 17, 2024 · 0 comments
Open

command don t execute async #6

ungurul opened this issue Nov 17, 2024 · 0 comments

Comments

@ungurul
Copy link

ungurul commented Nov 17, 2024

[02:17:13 WARN]: [AxAFKZone] Location task for AxAFKZone v1.3.1 in world CraftWorld{name=world} at -4, 17 generated an exception java.lang.IllegalStateException: Dispatching command async at io.papermc.paper.threadedregions.RegionizedServer.ensureGlobalTickThread(RegionizedServer.java:105) ~[folia-1.21.1.jar:1.21.1-DEV-5833269] at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:1037) ~[folia-1.21.1.jar:1.21.1-DEV-5833269] at org.bukkit.Bukkit.dispatchCommand(Bukkit.java:1114) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?] at AxAFKZone-1.3.1.jar/com.artillexstudios.axafkzone.reward.Reward.lambda$run$0(Reward.java:62) ~[AxAFKZone-1.3.1.jar:?] at AxAFKZone-1.3.1.jar/com.artillexstudios.axafkzone.libs.axapi.scheduler.impl.FoliaScheduler.lambda$runAt$11(FoliaScheduler.java:84) ~[AxAFKZone-1.3.1.jar:?] at io.papermc.paper.threadedregions.scheduler.FoliaRegionScheduler$LocationScheduledTask.run(FoliaRegionScheduler.java:331) ~[folia-1.21.1.jar:?] at io.papermc.paper.threadedregions.scheduler.FoliaRegionScheduler$Scheduler.tick(FoliaRegionScheduler.java:272) ~[folia-1.21.1.jar:?] at io.papermc.paper.threadedregions.scheduler.FoliaRegionScheduler.tick(FoliaRegionScheduler.java:142) ~[folia-1.21.1.jar:?] at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1697) ~[folia-1.21.1.jar:1.21.1-DEV-5833269] at io.papermc.paper.threadedregions.TickRegions$ConcreteRegionTickHandle.tickRegion(TickRegions.java:407) ~[folia-1.21.1.jar:1.21.1-DEV-5833269] at io.papermc.paper.threadedregions.TickRegionScheduler$RegionScheduleHandle.runTick(TickRegionScheduler.java:418) ~[folia-1.21.1.jar:1.21.1-DEV-5833269] at ca.spottedleaf.concurrentutil.scheduler.SchedulerThreadPool$TickThreadRunner.run(SchedulerThreadPool.java:540) ~[folia-1.21.1.jar:1.21.1-DEV-5833269] at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]

    I talked with ChatGPT and this is the answer:
    
    This error indicates that the **AxAFKZone** plugin attempted to execute a **command dispatch** on an asynchronous thread, which is incompatible with how Minecraft servers running **Folia** operate. Folia introduces a region-based execution model, and commands must be executed on the **main server thread** or specifically on the relevant region.

Possible Solutions:

  1. Update AxAFKZone Plugin:
    Check if there is a newer version of the AxAFKZone plugin that is compatible with Folia. Newer plugin versions may include support for Folia's asynchronous structure.

  2. Folia Compatibility:
    If the plugin was not designed for Folia, it might not work properly without changes. Contact the plugin developer to report the issue and request an update.

  3. Rewrite the Asynchronous Task:
    If you have access to the plugin’s source code or can collaborate with a developer:

    • Modify the section of code where the command is executed (Reward.lambda$run$0) to ensure it runs on the main thread. For example, use Folia's API methods to schedule the command on the main thread.
  4. Replace the Plugin:
    If the plugin is not updated and the issue persists, consider using a different plugin with similar functionality that is compatible with Folia.

Immediate Steps:

  • Check the official documentation for AxAFKZone and Folia for specific requirements.
  • Update Folia and all plugins to their latest compatible versions.

If you need help with configuration or further debugging, feel free to ask! 😊

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

No branches or pull requests

1 participant