Block2Block / HubParkour

A fun Hub Parkour plugin with checkpoints, rewards and more!
Apache License 2.0
9 stars 10 forks source link

NPE InventoryClickEvent #3

Closed SirKillian closed 3 years ago

SirKillian commented 3 years ago

The following error wiped a player's inventory and was unable to get their stuff back.

[10:00:18] [Server thread/ERROR]: Could not pass event InventoryClickEvent to HubParkour v2.3.1 java.lang.NullPointerException: null at me.block2block.hubparkour.listeners.DropListener.onInventoryInteract(DropListener.java:44) ~[?:?] at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor849.execute(Unknown Source) ~[?:?] at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[patched_1.16.5.jar:git-Tuinity-"502d57b"] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.16.5.jar:git-Tuinity-"502d57b"] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.16.5.jar:git-Tuinity-"502d57b"] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:607) ~[patched_1.16.5.jar:git-Tuinity-"502d57b"] at net.minecraft.server.v1_16_R3.PlayerConnection.a(PlayerConnection.java:2585) ~[patched_1.16.5.jar:git-Tuinity-"502d57b"] at net.minecraft.server.v1_16_R3.PacketPlayInWindowClick.a(SourceFile:32) ~[patched_1.16.5.jar:git-Tuinity-"502d57b"] at net.minecraft.server.v1_16_R3.PacketPlayInWindowClick.a(SourceFile:10) ~[patched_1.16.5.jar:git-Tuinity-"502d57b"] at net.minecraft.server.v1_16_R3.PlayerConnectionUtils.lambda$ensureMainThread$1(PlayerConnectionUtils.java:43) ~[patched_1.16.5.jar:git-Tuinity-"502d57b"] at net.minecraft.server.v1_16_R3.TickTask.run(SourceFile:18) ~[patched_1.16.5.jar:git-Tuinity-"502d57b"] at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[patched_1.16.5.jar:git-Tuinity-"502d57b"] at net.minecraft.server.v1_16_R3.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[patched_1.16.5.jar:git-Tuinity-"502d57b"] at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[patched_1.16.5.jar:git-Tuinity-"502d57b"] at net.minecraft.server.v1_16_R3.MinecraftServer.bb(MinecraftServer.java:1192) ~[patched_1.16.5.jar:git-Tuinity-"502d57b"] at net.minecraft.server.v1_16_R3.MinecraftServer.executeNext(MinecraftServer.java:1185) ~[patched_1.16.5.jar:git-Tuinity-"502d57b"] at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119) ~[patched_1.16.5.jar:git-Tuinity-"502d57b"] at net.minecraft.server.v1_16_R3.MinecraftServer.sleepForTick(MinecraftServer.java:1161) ~[patched_1.16.5.jar:git-Tuinity-"502d57b"] at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1005) ~[patched_1.16.5.jar:git-Tuinity-"502d57b"] at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:175) ~[patched_1.16.5.jar:git-Tuinity-"502d57b"] at java.lang.Thread.run(Thread.java:834) [?:?]

Block2Block commented 3 years ago

The following error wiped a player's inventory and was unable to get their stuff back.

[10:00:18] [Server thread/ERROR]: Could not pass event InventoryClickEvent to HubParkour v2.3.1 java.lang.NullPointerException: null at me.block2block.hubparkour.listeners.DropListener.onInventoryInteract(DropListener.java:44) ~[?:?] at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor849.execute(Unknown Source) ~[?:?] at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[patched_1.16.5.jar:git-Tuinity-"502d57b"] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.16.5.jar:git-Tuinity-"502d57b"] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.16.5.jar:git-Tuinity-"502d57b"] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:607) ~[patched_1.16.5.jar:git-Tuinity-"502d57b"] at net.minecraft.server.v1_16_R3.PlayerConnection.a(PlayerConnection.java:2585) ~[patched_1.16.5.jar:git-Tuinity-"502d57b"] at net.minecraft.server.v1_16_R3.PacketPlayInWindowClick.a(SourceFile:32) ~[patched_1.16.5.jar:git-Tuinity-"502d57b"] at net.minecraft.server.v1_16_R3.PacketPlayInWindowClick.a(SourceFile:10) ~[patched_1.16.5.jar:git-Tuinity-"502d57b"] at net.minecraft.server.v1_16_R3.PlayerConnectionUtils.lambda$ensureMainThread$1(PlayerConnectionUtils.java:43) ~[patched_1.16.5.jar:git-Tuinity-"502d57b"] at net.minecraft.server.v1_16_R3.TickTask.run(SourceFile:18) ~[patched_1.16.5.jar:git-Tuinity-"502d57b"] at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[patched_1.16.5.jar:git-Tuinity-"502d57b"] at net.minecraft.server.v1_16_R3.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[patched_1.16.5.jar:git-Tuinity-"502d57b"] at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[patched_1.16.5.jar:git-Tuinity-"502d57b"] at net.minecraft.server.v1_16_R3.MinecraftServer.bb(MinecraftServer.java:1192) ~[patched_1.16.5.jar:git-Tuinity-"502d57b"] at net.minecraft.server.v1_16_R3.MinecraftServer.executeNext(MinecraftServer.java:1185) ~[patched_1.16.5.jar:git-Tuinity-"502d57b"] at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119) ~[patched_1.16.5.jar:git-Tuinity-"502d57b"] at net.minecraft.server.v1_16_R3.MinecraftServer.sleepForTick(MinecraftServer.java:1161) ~[patched_1.16.5.jar:git-Tuinity-"502d57b"] at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1005) ~[patched_1.16.5.jar:git-Tuinity-"502d57b"] at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:175) ~[patched_1.16.5.jar:git-Tuinity-"502d57b"] at java.lang.Thread.run(Thread.java:834) [?:?]

I'm going to need a bit more information, what was the player doing when this occurred? Had they finished the parkour or were they still in the parkour when it occurred? I'm also going to need your current config.yml.

Based on what I'm seeing from this error, this is completely unrelated to any issues with players not receiving their inventory back as this should only ever occur if a player clicks in their inventory while in a parkour, which inherently should not cause any issues with receiving their inventory back. I have patched what I assume is causing this issue and will be pushed in the next update which is in progress, but I cannot guarantee that it will fix the issue you are experiencing.

SirKillian commented 3 years ago

The player was inside the parkour. (the parkour was actively counting). The payer then tried to use /enderchest to get items in his inventory. (we had the option to empty inventory on start turned on). I cannot provide much more than this considering the player did not really cooperate with me trying to get more information. lol

Block2Block commented 3 years ago

Meant to close this back when I released 2.4, should have been addressed in that version. Can be downloaded from the spigot page.