GorgeousOne/TangledMaze

NPE on player disconnect

SlimeDog opened this issue · 1 comments

Spigot 1.15.2
TangledMaze 1.3.5

On player disconnect:

[17:13:19] [Server thread/ERROR]: Could not pass event PlayerQuitEvent to TangledMaze v1.3.5
org.bukkit.event.EventException: null
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:319) ~[spigot-1.15.2.jar-2020-02-23-0737:git-Spigot-8faa8b4-3d61a85]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[spigot-1.15.2.jar-2020-02-23-0737:git-Spigot-8faa8b4-3d61a85]
        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:541) [spigot-1.15.2.jar-2020-02-23-0737:git-Spigot-8faa8b4-3d61a85]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:528) [spigot-1.15.2.jar-2020-02-23-0737:git-Spigot-8faa8b4-3d61a85]
        at net.minecraft.server.v1_15_R1.PlayerList.disconnect(PlayerList.java:387) [spigot-1.15.2.jar-2020-02-23-0737:git-Spigot-8faa8b4-3d61a85]
        at net.minecraft.server.v1_15_R1.PlayerConnection.a(PlayerConnection.java:1371) [?:git-Spigot-8faa8b4-3d61a85]
        at com.denizenscript.denizen.nms.v1_15.impl.network.handlers.AbstractListenerPlayInImpl.a(AbstractListenerPlayInImpl.java:331) [Denizen-1.1.3-b4623.jar:?]
        at net.minecraft.server.v1_15_R1.NetworkManager.handleDisconnection(NetworkManager.java:320) [spigot-1.15.2.jar-2020-02-23-0737:git-Spigot-8faa8b4-3d61a85]
        at net.minecraft.server.v1_15_R1.ServerConnection.c(ServerConnection.java:153) [spigot-1.15.2.jar-2020-02-23-0737:git-Spigot-8faa8b4-3d61a85]
        at net.minecraft.server.v1_15_R1.MinecraftServer.b(MinecraftServer.java:1105) [spigot-1.15.2.jar-2020-02-23-0737:git-Spigot-8faa8b4-3d61a85]
        at net.minecraft.server.v1_15_R1.DedicatedServer.b(DedicatedServer.java:406) [spigot-1.15.2.jar-2020-02-23-0737:git-Spigot-8faa8b4-3d61a85]
        at net.minecraft.server.v1_15_R1.MinecraftServer.a(MinecraftServer.java:984) [spigot-1.15.2.jar-2020-02-23-0737:git-Spigot-8faa8b4-3d61a85]
        at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:824) [spigot-1.15.2.jar-2020-02-23-0737:git-Spigot-8faa8b4-3d61a85]
        at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.lang.NullPointerException
        at me.gorgeousone.tangledmaze.handlers.Renderer.hideMaze(Renderer.java:159) ~[?:?]
        at me.gorgeousone.tangledmaze.handlers.MazeHandler.removeMaze(MazeHandler.java:67) ~[?:?]
        at me.gorgeousone.tangledmaze.listeners.PlayerQuitListener.onPlayerQuit(PlayerQuitListener.java:28) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:315) ~[spigot-1.15.2.jar-2020-02-23-0737:git-Spigot-8faa8b4-3d61a85]
        ... 13 more

Confirmed fixed in TM 1.3.6. Thanks.