Skip to content

Conversation

@leir4iks
Copy link

@leir4iks leir4iks commented Oct 1, 2025

Hello! I've discovered an issue with your plugin when running on Folia.
The PlayerQuitEvent on Folia is executed synchronously on the main server thread. However, your custom ICPlayerQuitEvent is required to be handled asynchronously. This causes the following error:

java.lang.IllegalStateException: ICPlayerQuitEvent may only be triggered asynchronously.
        at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:40) ~[folia-1.21.8.jar:1.21.8-5-7a1c5c7]
        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131) ~[folia-1.21.8.jar:1.21.8-5-7a1c5c7]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:628) ~[folia-api-1.21.8-R0.1-SNAPSHOT.jar:?]
        at InteractiveChat-4.3.2.0 (1).jar/com.loohp.interactivechat.objectholders.ICPlayerFactory$1.onLeave(ICPlayerFactory.java:100) ~[InteractiveChat-4.3.2.0 (1).jar:?]
        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[folia-api-1.21.8-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:71) ~[folia-api-1.21.8-R0.1-SNAPSHOT.jar:?]
        at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[folia-1.21.8.jar:1.21.8-5-7a1c5c7]
        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131) ~[folia-1.21.8.jar:1.21.8-5-7a1c5c7]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:628) ~[folia-api-1.21.8-R0.1-SNAPSHOT.jar:?]
        at net.minecraft.server.players.PlayerList.remove(PlayerList.java:605) ~[folia-1.21.8.jar:1.21.8-5-7a1c5c7]
        at net.minecraft.server.players.PlayerList.remove(PlayerList.java:592) ~[folia-1.21.8.jar:1.21.8-5-7a1c5c7]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.removePlayerFromWorld(ServerGamePacketListenerImpl.java:2245) ~[folia-1.21.8.jar:1.21.8-5-7a1c5c7]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.onDisconnect(ServerGamePacketListenerImpl.java:2221) ~[folia-1.21.8.jar:1.21.8-5-7a1c5c7]
        at net.minecraft.network.Connection.handleDisconnection(Connection.java:924) ~[folia-1.21.8.jar:1.21.8-5-7a1c5c7]
        at io.papermc.paper.threadedregions.RegionizedWorldData.tickConnections(RegionizedWorldData.java:509) ~[folia-1.21.8.jar:1.21.8-5-7a1c5c7]
        at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1850) ~[folia-1.21.8.jar:1.21.8-5-7a1c5c7]
        at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1668) ~[folia-1.21.8.jar:1.21.8-5-7a1c5c7]
        at io.papermc.paper.threadedregions.TickRegions$ConcreteRegionTickHandle.tickRegion(TickRegions.java:407) ~[folia-1.21.8.jar:1.21.8-5-7a1c5c7]
        at io.papermc.paper.threadedregions.TickRegionScheduler$RegionScheduleHandle.runTick(TickRegionScheduler.java:418) ~[folia-1.21.8.jar:1.21.8-5-7a1c5c7]
        at ca.spottedleaf.concurrentutil.scheduler.SchedulerThreadPool$TickThreadRunner.run(SchedulerThreadPool.java:546) ~[concurrentutil-0.0.3.jar:?]
        at java.base/java.lang.Thread.run(Thread.java:1570) ~[?:?]

@leir4iks
Copy link
Author

leir4iks commented Oct 1, 2025

@LOOHP

@leir4iks
Copy link
Author

@LOOHP Hello?

@LOOHP
Copy link
Owner

LOOHP commented Oct 29, 2025

I think the correct way to fix this is to fix the underlying cause which is this being incorrect on Folia.

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.

2 participants