NullPointerException when clicking outside save sign inventory
Technoguyfication opened this issue ยท 0 comments
Describe the bug
A NullPointerException is generated when clicking outside the saves inventory in your TARDIS.
Error text:
[02:18:40 ERROR]: Could not pass event InventoryClickEvent to TARDIS v4.7.0-b10.06.21-19:56
java.lang.NullPointerException: Cannot invoke "org.bukkit.inventory.Inventory.getItem(int)" because the return value of "org.bukkit.event.inventory.InventoryClickEvent.getClickedInventory()" is null
at me.eccentric_nz.TARDIS.listeners.TARDISSaveSignListener.onSaveTerminalClick(TARDISSaveSignListener.java:259) ~[?:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor350.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[patched_1.16.5.jar:git-Paper-777]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.16.5.jar:git-Paper-777]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.16.5.jar:git-Paper-777]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:624) ~[patched_1.16.5.jar:git-Paper-777] at net.minecraft.server.v1_16_R3.PlayerConnection.a(PlayerConnection.java:2715) ~[patched_1.16.5.jar:git-Paper-777]
at net.minecraft.server.v1_16_R3.PacketPlayInWindowClick.a(SourceFile:32) ~[patched_1.16.5.jar:git-Paper-777]
at net.minecraft.server.v1_16_R3.PacketPlayInWindowClick.a(SourceFile:10) ~[patched_1.16.5.jar:git-Paper-777]
at net.minecraft.server.v1_16_R3.PlayerConnectionUtils.lambda$ensureMainThread$1(PlayerConnectionUtils.java:35) ~[patched_1.16.5.jar:git-Paper-777]
at net.minecraft.server.v1_16_R3.TickTask.run(SourceFile:18) ~[patched_1.16.5.jar:git-Paper-777]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[patched_1.16.5.jar:git-Paper-777]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[patched_1.16.5.jar:git-Paper-777]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[patched_1.16.5.jar:git-Paper-777]
at net.minecraft.server.v1_16_R3.MinecraftServer.bb(MinecraftServer.java:1266) ~[patched_1.16.5.jar:git-Paper-777]
at net.minecraft.server.v1_16_R3.MinecraftServer.executeNext(MinecraftServer.java:1259) ~[patched_1.16.5.jar:git-Paper-777]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119) ~[patched_1.16.5.jar:git-Paper-777]
at net.minecraft.server.v1_16_R3.MinecraftServer.sleepForTick(MinecraftServer.java:1220) ~[patched_1.16.5.jar:git-Paper-777]
at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1134) ~[patched_1.16.5.jar:git-Paper-777]
at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:291) ~[patched_1.16.5.jar:git-Paper-777]
at java.lang.Thread.run(Thread.java:831) [?:?]
Note: I have a PR to fix this, will submit shortly
To Reproduce
Steps to reproduce the behaviour:
- Install TARDIS plugin
- Make a TARDIS
- Turn it on
- Open the saves menu
- Click on the area outside the inventory window
- Bug occurs
/tardis version
output
[02:26:59 INFO]: [TARDIS] Server version: git-Paper-777 (MC: 1.16.5)
[02:26:59 INFO]: [TARDIS] TARDIS version: 4.7.0-b15.06.21-02:23
[02:26:59 INFO]: [TARDIS] TARDISChunkGenerator version: 4.6.3
[02:26:59 INFO]: [TARDIS] Essentials version: 2.18.2.0
[02:26:59 INFO]: [TARDIS] WorldGuard version: 7.0.4+f7ff984