PyvesB / advanced-achievements

:fireworks: Popular plugin that adds unique and challenging achievements to Minecraft servers.
https://www.spigotmc.org/resources/83466
GNU General Public License v3.0
199 stars 215 forks source link

NullPointerException in ListGUIListener #532

Closed coco0325 closed 5 years ago

coco0325 commented 5 years ago

05.06 12:02:27 [Server] ERROR Could not pass event InventoryClickEvent to AdvancedAchievements v5.12.0 05.06 12:02:27 [Server] INFO java.lang.NullPointerException: null 05.06 12:02:27 [Server] INFO at com.hm.achievement.listener.ListGUIListener.onInventoryClick(ListGUIListener.java:68) ~[?:?] 05.06 12:02:27 [Server] INFO at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor626.execute(Unknown Source) ~[?:?] 05.06 12:02:27 [Server] INFO at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[patched_1.14.2.jar:git-Paper-65] 05.06 12:02:27 [Server] INFO at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.14.2.jar:git-Paper-65] 05.06 12:02:27 [Server] INFO at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.14.2.jar:git-Paper-65] 05.06 12:02:27 [Server] INFO at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:536) ~[patched_1.14.2.jar:git-Paper-65] 05.06 12:02:27 [Server] INFO at net.minecraft.server.v1_14_R1.PlayerConnection.a(PlayerConnection.java:2342) ~[patched_1.14.2.jar:git-Paper-65] 05.06 12:02:27 [Server] INFO at net.minecraft.server.v1_14_R1.PacketPlayInWindowClick.a(SourceFile:33) ~[patched_1.14.2.jar:git-Paper-65] 05.06 12:02:27 [Server] INFO at net.minecraft.server.v1_14_R1.PacketPlayInWindowClick.a(SourceFile:10) ~[patched_1.14.2.jar:git-Paper-65] 05.06 12:02:27 [Server] INFO at net.minecraft.server.v1_14_R1.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:18) ~[patched_1.14.2.jar:git-Paper-65] 05.06 12:02:27 [Server] INFO at net.minecraft.server.v1_14_R1.TickTask.run(SourceFile:18) ~[patched_1.14.2.jar:git-Paper-65] 05.06 12:02:27 [Server] INFO at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:127) ~[patched_1.14.2.jar:git-Paper-65] 05.06 12:02:27 [Server] INFO at net.minecraft.server.v1_14_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[patched_1.14.2.jar:git-Paper-65] 05.06 12:02:27 [Server] INFO at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:105) ~[patched_1.14.2.jar:git-Paper-65] 05.06 12:02:27 [Server] INFO at net.minecraft.server.v1_14_R1.MinecraftServer.aW(MinecraftServer.java:998) ~[patched_1.14.2.jar:git-Paper-65] 05.06 12:02:27 [Server] INFO at net.minecraft.server.v1_14_R1.MinecraftServer.executeNext(MinecraftServer.java:991) ~[patched_1.14.2.jar:git-Paper-65] 05.06 12:02:27 [Server] INFO at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:115) ~[patched_1.14.2.jar:git-Paper-65] 05.06 12:02:27 [Server] INFO at net.minecraft.server.v1_14_R1.MinecraftServer.sleepForTick(MinecraftServer.java:975) ~[patched_1.14.2.jar:git-Paper-65] 05.06 12:02:27 [Server] INFO at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:908) ~[patched_1.14.2.jar:git-Paper-65] 05.06 12:02:27 [Server] INFO at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212]

PyvesB commented 5 years ago

Hello @coco0325,

Thanks for reporting this!

@jascotty2 I don't believe the fix you did in #529 will cover this: a NullPointerException can still happen when clicking on an empty slot on the main GUI page. Would you like to submit a new pull request? 😄

Cheers,

Pyves

jascotty2 commented 5 years ago

Checked back on it, and I see where that commit went wrong xD I'll put in a PR :)