ItemJoin

ItemJoin

157k Downloads

NPE on click

SlimeDog opened this issue ยท 3 comments

commented

Spigot 1.12
IJ 4.2

[15:08:07 INFO]: rambeau issued server command: /deluxemenus open navigation -s
[15:08:09 ERROR]: Could not pass event InventoryClickEvent to ItemJoin v4.2
org.bukkit.event.EventException: null
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot-1.12.jar-2017-07-16-0637:git-Spigot-99c2a37-c1b8cac]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot-1.12.jar-2017-07-16-0637:git-Spigot-99c2a37-c1b8cac]
        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:499) [spigot-1.12.jar-2017-07-16-0637:git-Spigot-99c2a37-c1b8cac]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:484) [spigot-1.12.jar-2017-07-16-0637:git-Spigot-99c2a37-c1b8cac]
        at net.minecraft.server.v1_12_R1.PlayerConnection.a(PlayerConnection.java:1877) [spigot-1.12.jar-2017-07-16-0637:git-Spigot-99c2a37-c1b8cac]
        at net.minecraft.server.v1_12_R1.PacketPlayInWindowClick.a(SourceFile:33) [spigot-1.12.jar-2017-07-16-0637:git-Spigot-99c2a37-c1b8cac]
        at net.minecraft.server.v1_12_R1.PacketPlayInWindowClick.a(SourceFile:10) [spigot-1.12.jar-2017-07-16-0637:git-Spigot-99c2a37-c1b8cac]
        at net.minecraft.server.v1_12_R1.PlayerConnectionUtils$1.run(SourceFile:13) [spigot-1.12.jar-2017-07-16-0637:git-Spigot-99c2a37-c1b8cac]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_131]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_131]
        at net.minecraft.server.v1_12_R1.SystemUtils.a(SourceFile:46) [spigot-1.12.jar-2017-07-16-0637:git-Spigot-99c2a37-c1b8cac]
        at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:747) [spigot-1.12.jar-2017-07-16-0637:git-Spigot-99c2a37-c1b8cac]
        at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:405) [spigot-1.12.jar-2017-07-16-0637:git-Spigot-99c2a37-c1b8cac]
        at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:678) [spigot-1.12.jar-2017-07-16-0637:git-Spigot-99c2a37-c1b8cac]
        at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:576) [spigot-1.12.jar-2017-07-16-0637:git-Spigot-99c2a37-c1b8cac]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]
Caused by: java.lang.NullPointerException
        at me.RockinChaos.itemjoin.listeners.InvClickCreative.hasItem(InvClickCreative.java:146) ~[?:?]
        at me.RockinChaos.itemjoin.listeners.InvClickCreative.onCreativeInventoryModify(InvClickCreative.java:75) ~[?:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_131]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_131]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_131]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_131]
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302) ~[spigot-1.12.jar-2017-07-16-0637:git-Spigot-99c2a37-c1b8cac]
        ... 15 more

Just in case this is useful. I noticed it in the log well after the event. No idea what caused it, but I did click on an item that sets game mode to creative. Gamemode did change to creative though, so I'm not sure what the error was. Have not found a reproduction scenario.

commented

My bad I forgot to add a null checker. Ill have a snapshot built in a few.
It wont cause any issues just an annoying error code.

commented

Issue has been fixed and released in v4.3
You can get it here; https://www.spigotmc.org/resources/itemjoin.12661/download?version=176180