Warns of access to `PlayerManager#getCurrentPlayerCount()` during server start-up on Discord message
axieum opened this issue ยท 0 comments
Expected behavior
For there to not be an error log sent during server start-up due to someone sending a Discord message while the server is starting.
Observed/actual behavior
[13.06 17:06:19] [Server] [Server thread/INFO]: Starting Minecraft server on 158.62.206.167:25565
[13.06 17:06:19] [Server] [Server thread/INFO]: Using epoll channel type
[13.06 17:06:20] [Server] [JDA MainWS-ReadThread/ERROR]: One of the EventListeners had an uncaught exception
[13.06 17:06:20] [Server] java.lang.NullPointerExceptionCannot invoke "net.minecraft.class_3324.method_14574()" because "this.field_4550" is null
[13.06 17:06:20] [Server] at net.minecraft.server.MinecraftServer.method_3788(MinecraftServer.java:976) ~[server-intermediary.jar:?]
[13.06 17:06:20] [Server] at me.axieum.mcmod.minecord.impl.chat.util.MinecraftDispatcher.lambda$dispatch$3(MinecraftDispatcher.java:102) ~[minecord-chat-2.0.0+1.20-f8e1f8c473c6979d.jar:?]
[13.06 17:06:20] [Server] at java.util.Optional.filter(Optional.java:218) ~[?:?]
[13.06 17:06:20] [Server] at me.axieum.mcmod.minecord.impl.chat.util.MinecraftDispatcher.dispatch(MinecraftDispatcher.java:102) ~[minecord-chat-2.0.0+1.20-f8e1f8c473c6979d.jar:?]
[13.06 17:06:20] [Server] at me.axieum.mcmod.minecord.impl.chat.util.MinecraftDispatcher.dispatch(MinecraftDispatcher.java:84) ~[minecord-chat-2.0.0+1.20-f8e1f8c473c6979d.jar:?]
[13.06 17:06:20] [Server] at me.axieum.mcmod.minecord.impl.chat.callback.discord.MessageReceivedListener.onText(MessageReceivedListener.java:106) ~[minecord-chat-2.0.0+1.20-f8e1f8c473c6979d.jar:?]
[13.06 17:06:20] [Server] at me.axieum.mcmod.minecord.impl.chat.callback.discord.MessageReceivedListener.onMessageReceived(MessageReceivedListener.java:37) ~[minecord-chat-2.0.0+1.20-f8e1f8c473c6979d.jar:?]
[13.06 17:06:20] [Server] at net.dv8tion.jda.api.hooks.ListenerAdapter.onEvent(ListenerAdapter.java:442) ~[minecord-api-2.0.1+1.20-a234684e30a65c97.jar:?]
[13.06 17:06:20] [Server] at net.dv8tion.jda.api.hooks.InterfacedEventManager.handle(InterfacedEventManager.java:96) ~[minecord-api-2.0.1+1.20-a234684e30a65c97.jar:?]
[13.06 17:06:20] [Server] at net.dv8tion.jda.internal.hooks.EventManagerProxy.handleInternally(EventManagerProxy.java:88) ~[minecord-api-2.0.1+1.20-a234684e30a65c97.jar:?]
[13.06 17:06:20] [Server] at net.dv8tion.jda.internal.hooks.EventManagerProxy.handle(EventManagerProxy.java:70) ~[minecord-api-2.0.1+1.20-a234684e30a65c97.jar:?]
[13.06 17:06:20] [Server] at net.dv8tion.jda.internal.JDAImpl.handleEvent(JDAImpl.java:176) ~[minecord-api-2.0.1+1.20-a234684e30a65c97.jar:?]
[13.06 17:06:20] [Server] at net.dv8tion.jda.internal.handle.MessageCreateHandler.handleInternally(MessageCreateHandler.java:136) ~[minecord-api-2.0.1+1.20-a234684e30a65c97.jar:?]
[13.06 17:06:20] [Server] at net.dv8tion.jda.internal.handle.SocketHandler.handle(SocketHandler.java:39) ~[minecord-api-2.0.1+1.20-a234684e30a65c97.jar:?]
[13.06 17:06:20] [Server] at net.dv8tion.jda.internal.requests.WebSocketClient.onDispatch(WebSocketClient.java:1014) ~[minecord-api-2.0.1+1.20-a234684e30a65c97.jar:?]
[13.06 17:06:20] [Server] at net.dv8tion.jda.internal.requests.WebSocketClient.onEvent(WebSocketClient.java:900) ~[minecord-api-2.0.1+1.20-a234684e30a65c97.jar:?]
[13.06 17:06:20] [Server] at net.dv8tion.jda.internal.requests.WebSocketClient.handleEvent(WebSocketClient.java:878) ~[minecord-api-2.0.1+1.20-a234684e30a65c97.jar:?]
[13.06 17:06:20] [Server] at net.dv8tion.jda.internal.requests.WebSocketClient.onBinaryMessage(WebSocketClient.java:1053) ~[minecord-api-2.0.1+1.20-a234684e30a65c97.jar:?]
[13.06 17:06:20] [Server] at com.neovisionaries.ws.client.ListenerManager.callOnBinaryMessage(ListenerManager.java:385) ~[minecord-api-2.0.1+1.20-a234684e30a65c97.jar:?]
[13.06 17:06:20] [Server] at com.neovisionaries.ws.client.ReadingThread.callOnBinaryMessage(ReadingThread.java:276) ~[minecord-api-2.0.1+1.20-a234684e30a65c97.jar:?]
[13.06 17:06:20] [Server] at com.neovisionaries.ws.client.ReadingThread.handleBinaryFrame(ReadingThread.java:996) ~[minecord-api-2.0.1+1.20-a234684e30a65c97.jar:?]
[13.06 17:06:20] [Server] at com.neovisionaries.ws.client.ReadingThread.handleFrame(ReadingThread.java:755) ~[minecord-api-2.0.1+1.20-a234684e30a65c97.jar:?]
[13.06 17:06:20] [Server] at com.neovisionaries.ws.client.ReadingThread.main(ReadingThread.java:108) ~[minecord-api-2.0.1+1.20-a234684e30a65c97.jar:?]
[13.06 17:06:20] [Server] at com.neovisionaries.ws.client.ReadingThread.runMain(ReadingThread.java:64) ~[minecord-api-2.0.1+1.20-a234684e30a65c97.jar:?]
[13.06 17:06:20] [Server] at com.neovisionaries.ws.client.WebSocketThread.run(WebSocketThread.java:45) ~[minecord-api-2.0.1+1.20-a234684e30a65c97.jar:?]
[13.06 17:06:20] [Server] [Server thread/INFO]: Preparing level "world"
Steps/models to reproduce
- Start the server
- Send a message in Discord while the server is starting
Version
v2.0.1+1.20
Agreements
- I am running the latest version of the mod.
- My version of Minecraft is supported.
- I have searched for and ensured there isn't already an open issue regarding this.
Other
No response