plan-player-analytics / Plan

Player Analytics plugin for Minecraft Server platforms - View player activity of your server with ease. :calendar:
https://www.spigotmc.org/resources/plan-player-analytics.32536/
GNU Lesser General Public License v3.0
869 stars 168 forks source link

DiscordSRV error #1941

Closed untuned closed 3 years ago

untuned commented 3 years ago

Describe the issue

DiscordSRV posts an error log after the server finishes loading. Scarsz told me it was an issue with Plan.

Exceptions & Other Logs

[10:26:16 ERROR]: [DiscordSRV] [JDA] One of the EventListeners had an uncaught exception
java.lang.NullPointerException
        at com.djrapitops.extension.DiscordSRVListener.updateUser(DiscordSRVListener.java:64)
        at com.djrapitops.extension.DiscordSRVListener.onGuildMemberLeave(DiscordSRVListener.java:114)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at github.scarsz.discordsrv.dependencies.jda.api.hooks.ListenerAdapter.onEvent(ListenerAdapter.java:411)
        at github.scarsz.discordsrv.dependencies.jda.api.hooks.InterfacedEventManager.handle(InterfacedEventManager.java:96)
        at github.scarsz.discordsrv.dependencies.jda.internal.hooks.EventManagerProxy.handleInternally(EventManagerProxy.java:88)
        at github.scarsz.discordsrv.dependencies.jda.internal.hooks.EventManagerProxy.handle(EventManagerProxy.java:70)
        at github.scarsz.discordsrv.dependencies.jda.internal.JDAImpl.handleEvent(JDAImpl.java:149)
        at github.scarsz.discordsrv.dependencies.jda.internal.handle.GuildMemberRemoveHandler.handleInternally(GuildMemberRemoveHandler.java:119)
        at github.scarsz.discordsrv.dependencies.jda.internal.handle.SocketHandler.handle(SocketHandler.java:36)
        at github.scarsz.discordsrv.dependencies.jda.internal.requests.WebSocketClient.onDispatch(WebSocketClient.java:956)
        at github.scarsz.discordsrv.dependencies.jda.internal.requests.WebSocketClient.onEvent(WebSocketClient.java:843)
        at github.scarsz.discordsrv.dependencies.jda.internal.requests.WebSocketClient.handleEvent(WebSocketClient.java:821)
        at github.scarsz.discordsrv.dependencies.jda.internal.requests.WebSocketClient.onBinaryMessage(WebSocketClient.java:994)
        at github.scarsz.discordsrv.dependencies.ws.client.ListenerManager.callOnBinaryMessage(ListenerManager.java:385)
        at github.scarsz.discordsrv.dependencies.ws.client.ReadingThread.callOnBinaryMessage(ReadingThread.java:276)
        at github.scarsz.discordsrv.dependencies.ws.client.ReadingThread.handleBinaryFrame(ReadingThread.java:996)
        at github.scarsz.discordsrv.dependencies.ws.client.ReadingThread.handleFrame(ReadingThread.java:755)
        at github.scarsz.discordsrv.dependencies.ws.client.ReadingThread.main(ReadingThread.java:108)
        at github.scarsz.discordsrv.dependencies.ws.client.ReadingThread.runMain(ReadingThread.java:64)
        at github.scarsz.discordsrv.dependencies.ws.client.WebSocketThread.run(WebSocketThread.java:45)

Additional information

Latest version of DiscordSRV, 1.22.0 Latest version of Plan, 5.3 Build 1284

portlek commented 3 years ago

Probably this method DiscordSRV.getPlugin().getAccountLinkManager() returns null, because accountLinkManager field in the DiscordSRV class, which is the main class of the plugin, sets the accountLinkManager in another thread; image