teakivy / teaks-tweaks

150+ Toggleable Tweaks & Features including Vanilla Tweaks as a plugin, and more!
https://modrinth.com/plugin/teaks-tweaks
MIT License
24 stars 16 forks source link

AFKStatusChangeEvent may only be triggered synchronously #130

Closed Vinellon closed 1 week ago

Vinellon commented 2 weeks ago

To Reproduce Steps to reproduce the behavior:

  1. afk-display: enabled: true
  2. Use /afk (or wait for the transition to afk)
  3. While in AFK to write something in chat
  4. See error

TeaksTweaks v2.0.4 MC1.21 I'm on Purpur-1.21.1-2328 with Chatty plugin.

[23:55:13 ERROR]: Could not pass event AsyncPlayerChatEvent to TeaksTweaks v2.0.4
java.lang.IllegalStateException: AFKStatusChangeEvent may only be triggered synchronously.
        at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:42) ~[purpur-1.21.1.jar:1.21.1-2328-d49ca07]
        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131) ~[purpur-1.21.1.jar:1.21.1-2328-d49ca07]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:630) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
        at TeaksTweaks-v2.0.4_MC-1.21.jar/me.teakivy.teakstweaks.packs.afkdisplay.AFK.unAFK(AFK.java:185) ~[TeaksTweaks-v2.0.4_MC-1.21.jar:?]
        at TeaksTweaks-v2.0.4_MC-1.21.jar/me.teakivy.teakstweaks.packs.afkdisplay.AFK.chatEvent(AFK.java:166) ~[TeaksTweaks-v2.0.4_MC-1.21.jar:?]
        at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor102.execute(Unknown Source) ~[?:?]
        at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:1.21.1-2328-d49ca07]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
        at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[purpur-1.21.1.jar:1.21.1-2328-d49ca07]
        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131) ~[purpur-1.21.1.jar:1.21.1-2328-d49ca07]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:630) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
        at io.papermc.paper.adventure.ChatProcessor.post(ChatProcessor.java:378) ~[purpur-1.21.1.jar:1.21.1-2328-d49ca07]
        at io.papermc.paper.adventure.ChatProcessor.process(ChatProcessor.java:85) ~[purpur-1.21.1.jar:1.21.1-2328-d49ca07]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.chat(ServerGamePacketListenerImpl.java:2493) ~[purpur-1.21.1.jar:1.21.1-2328-d49ca07]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.broadcastChatMessage(ServerGamePacketListenerImpl.java:2609) ~[purpur-1.21.1.jar:1.21.1-2328-d49ca07]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChat$13(ServerGamePacketListenerImpl.java:2257) ~[purpur-1.21.1.jar:1.21.1-2328-d49ca07]
        at net.minecraft.util.FutureChain.lambda$append$1(FutureChain.java:25) ~[purpur-1.21.1.jar:1.21.1-2328-d49ca07]
        at java.base/java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:718) ~[?:?]
        at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482) ~[?:?]
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
        at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]