本帖最后由 君忆 于 2022-2-24 02:47 编辑 
报错如下:
已解决,延迟1tick执行就行
报错如下:
| [01:56:43 FATAL]: Thread Async Chat Thread - #1 failed main thread check: command dispatch java.lang.Throwable: null at org.spigotmc.AsyncCatcher.catchOp(AsyncCatcher.java:15) ~[purpur-1.18.1.jar:git-Purpur-1505] at org.bukkit.craftbukkit.v1_18_R1.CraftServer.dispatchCommand(CraftServer.java:873) ~[purpur-1.18.1.jar:git-Purpur-1505] at org.bukkit.Bukkit.dispatchCommand(Bukkit.java:907) ~[purpur-api-1.18.1-R0.1-SNAPSHOT.jar:?] at xyz.jizhexka.firstJoinEvents.internal.core.RewardAction.consoleType(RewardAction.kt:35) ~[FirstJoinEvents-1.0.0.jar:?] at xyz.jizhexka.firstJoinEvents.internal.core.RewardAction.type(RewardAction.kt:52) ~[FirstJoinEvents-1.0.0.jar:?] at xyz.jizhexka.firstJoinEvents.internal.core.RewardAction.giveReward(RewardAction.kt:62) ~[FirstJoinEvents-1.0.0.jar:?] at xyz.jizhexka.firstJoinEvents.internal.listener.OnChat.onChat(OnChat.kt:20) ~[FirstJoinEvents-1.0.0.jar:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?] at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?] at xyz.jizhexka.firstJoinEvents.taboolib.common.platform.event.EventBus$inject$2.invoke(EventBus.kt:39) ~[FirstJoinEvents-1.0.0.jar:?] at xyz.jizhexka.firstJoinEvents.taboolib.common.platform.event.EventBus$inject$2.invoke(EventBus.kt:39) ~[FirstJoinEvents-1.0.0.jar:?] at xyz.jizhexka.firstJoinEvents.taboolib.common.platform.function.ListenerKt$registerBukkitListener$1.invoke(Listener.kt:21) ~[FirstJoinEvents-1.0.0.jar:?] at xyz.jizhexka.firstJoinEvents.taboolib.common.platform.function.ListenerKt$registerBukkitListener$1.invoke(Listener.kt:21) ~[FirstJoinEvents-1.0.0.jar:?] at xyz.jizhexka.firstJoinEvents.taboolib.platform.BukkitListener$registerListener$listener$1.invoke(BukkitListener.kt:35) ~[FirstJoinEvents-1.0.0.jar:?] at xyz.jizhexka.firstJoinEvents.taboolib.platform.BukkitListener$registerListener$listener$1.invoke(BukkitListener.kt:35) ~[FirstJoinEvents-1.0.0.jar:?] at xyz.jizhexka.firstJoinEvents.taboolib.platform.BukkitListener$BukkitListener.execute(BukkitListener.kt:72) ~[FirstJoinEvents-1.0.0.jar:?] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:76) ~[purpur-api-1.18.1-R0.1-SNAPSHOT.jar:git-Purpur-1505] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[purpur-api-1.18.1-R0.1-SNAPSHOT.jar:?] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:630) ~[purpur-api-1.18.1-R0.1-SNAPSHOT.jar:?] at io.papermc.paper.adventure.ChatProcessor.post(ChatProcessor.java:230) ~[purpur-1.18.1.jar:git-Purpur-1505] at io.papermc.paper.adventure.ChatProcessor.processingLegacyFirst(ChatProcessor.java:115) ~[purpur-1.18.1.jar:git-Purpur-1505] at io.papermc.paper.adventure.ChatProcessor.process(ChatProcessor.java:64) ~[purpur-1.18.1.jar:git-Purpur-1505] at net.minecraft.server.network.ServerGamePacketListenerImpl.chat(ServerGamePacketListenerImpl.java:2285) ~[?:?] at net.minecraft.server.network.ServerGamePacketListenerImpl.handleChat(ServerGamePacketListenerImpl.java:2196) ~[?:?] at net.minecraft.server.network.ServerGamePacketListenerImpl.handleChat(ServerGamePacketListenerImpl.java:2162) ~[?:?] at net.minecraft.network.protocol.game.ServerboundChatPacket$1.run(ServerboundChatPacket.java:40) ~[?:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?] at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?] at java.lang.Thread.run(Thread.java:833) ~[?:?] [01:56:43 ERROR]: Could not pass event AsyncPlayerChatEvent to FirstJoinEvents v1.0.0 java.lang.reflect.InvocationTargetException: null at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?] at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?] at xyz.jizhexka.firstJoinEvents.taboolib.common.platform.event.EventBus$inject$2.invoke(EventBus.kt:39) ~[FirstJoinEvents-1.0.0.jar:?] at xyz.jizhexka.firstJoinEvents.taboolib.common.platform.event.EventBus$inject$2.invoke(EventBus.kt:39) ~[FirstJoinEvents-1.0.0.jar:?] at xyz.jizhexka.firstJoinEvents.taboolib.common.platform.function.ListenerKt$registerBukkitListener$1.invoke(Listener.kt:21) ~[FirstJoinEvents-1.0.0.jar:?] at xyz.jizhexka.firstJoinEvents.taboolib.common.platform.function.ListenerKt$registerBukkitListener$1.invoke(Listener.kt:21) ~[FirstJoinEvents-1.0.0.jar:?] at xyz.jizhexka.firstJoinEvents.taboolib.platform.BukkitListener$registerListener$listener$1.invoke(BukkitListener.kt:35) ~[FirstJoinEvents-1.0.0.jar:?] at xyz.jizhexka.firstJoinEvents.taboolib.platform.BukkitListener$registerListener$listener$1.invoke(BukkitListener.kt:35) ~[FirstJoinEvents-1.0.0.jar:?] at xyz.jizhexka.firstJoinEvents.taboolib.platform.BukkitListener$BukkitListener.execute(BukkitListener.kt:72) ~[FirstJoinEvents-1.0.0.jar:?] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:76) ~[purpur-api-1.18.1-R0.1-SNAPSHOT.jar:git-Purpur-1505] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[purpur-api-1.18.1-R0.1-SNAPSHOT.jar:?] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:630) ~[purpur-api-1.18.1-R0.1-SNAPSHOT.jar:?] at io.papermc.paper.adventure.ChatProcessor.post(ChatProcessor.java:230) ~[purpur-1.18.1.jar:git-Purpur-1505] at io.papermc.paper.adventure.ChatProcessor.processingLegacyFirst(ChatProcessor.java:115) ~[purpur-1.18.1.jar:git-Purpur-1505] at io.papermc.paper.adventure.ChatProcessor.process(ChatProcessor.java:64) ~[purpur-1.18.1.jar:git-Purpur-1505] at net.minecraft.server.network.ServerGamePacketListenerImpl.chat(ServerGamePacketListenerImpl.java:2285) ~[?:?] at net.minecraft.server.network.ServerGamePacketListenerImpl.handleChat(ServerGamePacketListenerImpl.java:2196) ~[?:?] at net.minecraft.server.network.ServerGamePacketListenerImpl.handleChat(ServerGamePacketListenerImpl.java:2162) ~[?:?] at net.minecraft.network.protocol.game.ServerboundChatPacket$1.run(ServerboundChatPacket.java:40) ~[?:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?] at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?] at java.lang.Thread.run(Thread.java:833) ~[?:?] Caused by: java.lang.IllegalStateException: Asynchronous command dispatch! at org.spigotmc.AsyncCatcher.catchOp(AsyncCatcher.java:16) ~[purpur-1.18.1.jar:git-Purpur-1505] at org.bukkit.craftbukkit.v1_18_R1.CraftServer.dispatchCommand(CraftServer.java:873) ~[purpur-1.18.1.jar:git-Purpur-1505] at org.bukkit.Bukkit.dispatchCommand(Bukkit.java:907) ~[purpur-api-1.18.1-R0.1-SNAPSHOT.jar:?] at xyz.jizhexka.firstJoinEvents.internal.core.RewardAction.consoleType(RewardAction.kt:35) ~[FirstJoinEvents-1.0.0.jar:?] at xyz.jizhexka.firstJoinEvents.internal.core.RewardAction.type(RewardAction.kt:52) ~[FirstJoinEvents-1.0.0.jar:?] at xyz.jizhexka.firstJoinEvents.internal.core.RewardAction.giveReward(RewardAction.kt:62) ~[FirstJoinEvents-1.0.0.jar:?] at xyz.jizhexka.firstJoinEvents.internal.listener.OnChat.onChat(OnChat.kt:20) ~[FirstJoinEvents-1.0.0.jar:?] ... 26 more | 
已解决,延迟1tick执行就行