Multitallented / Civs

A town building and modular spell plugin
GNU General Public License v3.0
51 stars 31 forks source link

Chat not working/error while shutting down the server #202

Closed sergix44 closed 3 years ago

sergix44 commented 3 years ago
[18:52:08 ERROR]: Could not pass event AsyncPlayerChatEvent to Civs v1.9.4
java.lang.NullPointerException: Cannot invoke "shaded.net.kyori.adventure.platform.bukkit.BukkitAudiences.sender(org.bukkit.command.CommandSender)" because "this.bukkitAudiences" is null
        at org.redcastlemedia.multitallented.civs.chat.ChatManager.formatMessage(ChatManager.java:71) ~[?:?]
        at org.redcastlemedia.multitallented.civs.civilians.CivilianListener.onPlayerChat(CivilianListener.java:749) ~[?:?]
        at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor89.execute(Unknown Source) ~[?:?]
        at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[patched_1.17.jar:git-Paper-68]
        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:76) ~[patched_1.17.jar:git-Paper-68]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.17.jar:git-Paper-68]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:624) ~[patched_1.17.jar:git-Paper-68]
        at io.papermc.paper.adventure.ChatProcessor.post(ChatProcessor.java:234) ~[patched_1.17.jar:git-Paper-68]
        at io.papermc.paper.adventure.ChatProcessor.processingLegacyFirst(ChatProcessor.java:116) ~[patched_1.17.jar:git-Paper-68]
        at io.papermc.paper.adventure.ChatProcessor.process(ChatProcessor.java:65) ~[patched_1.17.jar:git-Paper-68]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.chat(ServerGamePacketListenerImpl.java:2102) ~[?:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.handleChat(ServerGamePacketListenerImpl.java:2013) ~[?:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.handleChat(ServerGamePacketListenerImpl.java:1979) ~[?:?]
        at net.minecraft.network.protocol.game.ServerboundChatPacket$1.run(ServerboundChatPacket.java:40) ~[?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) ~[?:?]
        at java.lang.Thread.run(Thread.java:831) [?:?]

This error is thrown every time a player write in chat (and the message does not appear), or also when shutting down the server:

[18:52:31 ERROR]: Error occurred while disabling Civs v1.9.4 (Is it up to date?)
java.lang.NullPointerException: Cannot invoke "shaded.net.kyori.adventure.platform.bukkit.BukkitAudiences.close()" because "this.bukkitAudiences" is null
        at org.redcastlemedia.multitallented.civs.chat.ChatManager.onDisable(ChatManager.java:81) ~[?:?]
        at org.redcastlemedia.multitallented.civs.Civs.onDisable(Civs.java:93) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:265) ~[patched_1.17.jar:git-Paper-68]
        at org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoader.java:405) ~[patched_1.17.jar:git-Paper-68]
        at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManager.java:533) ~[patched_1.17.jar:git-Paper-68]
        at org.bukkit.plugin.SimplePluginManager.disablePlugins(SimplePluginManager.java:519) ~[patched_1.17.jar:git-Paper-68]
        at org.bukkit.plugin.SimplePluginManager.disablePlugins(SimplePluginManager.java:512) ~[patched_1.17.jar:git-Paper-68]
        at org.bukkit.craftbukkit.v1_17_R1.CraftServer.disablePlugins(CraftServer.java:452) ~[patched_1.17.jar:git-Paper-68]
        at net.minecraft.server.MinecraftServer.stopServer(MinecraftServer.java:951) ~[patched_1.17.jar:git-Paper-68]
        at net.minecraft.server.dedicated.DedicatedServer.stopServer(DedicatedServer.java:804) ~[patched_1.17.jar:git-Paper-68]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1230) ~[patched_1.17.jar:git-Paper-68]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:320) ~[patched_1.17.jar:git-Paper-68]
        at java.lang.Thread.run(Thread.java:831) [?:?]
ICEconchy commented 3 years ago

Same here

[02.07 00:13:02] [Server] [ERROR] Could not pass event AsyncPlayerChatEvent to Civs v1.9.4 [02.07 00:13:02] [Server] java.lang.NullPointerExceptionCannot invoke "shaded.net.kyori.adventure.platform.bukkit.BukkitAudiences.sender(org.bukkit.command.CommandSender)" because "this.bukkitAudiences" is null [02.07 00:13:02] [Server] at org.redcastlemedia.multitallented.civs.chat.ChatManager.formatMessage(ChatManager.java:71) ~[?:?] [02.07 00:13:02] [Server] at org.redcastlemedia.multitallented.civs.civilians.CivilianListener.onPlayerChat(CivilianListener.java:749) ~[?:?] [02.07 00:13:02] [Server] at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor254.execute(Unknown Source) ~[?:?] [02.07 00:13:02] [Server] at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[patched_1.17.jar:git-Paper-68] [02.07 00:13:02] [Server] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:76) ~[patched_1.17.jar:git-Paper-68] [02.07 00:13:02] [Server] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.17.jar:git-Paper-68] [02.07 00:13:02] [Server] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:624) ~[patched_1.17.jar:git-Paper-68] [02.07 00:13:02] [Server] at io.papermc.paper.adventure.ChatProcessor.post(ChatProcessor.java:234) ~[patched_1.17.jar:git-Paper-68] [02.07 00:13:02] [Server] at io.papermc.paper.adventure.ChatProcessor.processingLegacyFirst(ChatProcessor.java:116) ~[patched_1.17.jar:git-Paper-68] [02.07 00:13:02] [Server] at io.papermc.paper.adventure.ChatProcessor.process(ChatProcessor.java:65) ~[patched_1.17.jar:git-Paper-68] [02.07 00:13:02] [Server] at net.minecraft.server.network.ServerGamePacketListenerImpl.chat(ServerGamePacketListenerImpl.java:2102) ~[?:?] [02.07 00:13:02] [Server] at net.minecraft.server.network.ServerGamePacketListenerImpl.handleChat(ServerGamePacketListenerImpl.java:2013) ~[?:?] [02.07 00:13:02] [Server] at net.minecraft.server.network.ServerGamePacketListenerImpl.handleChat(ServerGamePacketListenerImpl.java:1979) ~[?:?] [02.07 00:13:02] [Server] at net.minecraft.network.protocol.game.ServerboundChatPacket$1.run(ServerboundChatPacket.java:40) ~[?:?] [02.07 00:13:02] [Server] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?] [02.07 00:13:02] [Server] at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?] [02.07 00:13:02] [Server] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) ~[?:?] [02.07 00:13:02] [Server] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) ~[?:?] [02.07 00:13:02] [Server] at java.lang.Thread.run(Thread.java:831) [?:?]

So it isn't an isolated incident

NeumimTo commented 3 years ago

fixed in #203 https://github.com/Multitallented/Civs/pull/203