Could not pass InventoryClickEvent

Discussion in 'Plugin Development' started by BoatWolf, Jan 7, 2017.

Thread Status:
Not open for further replies.
  1. Offline

    BoatWolf

    When I look at other forums it just says add a null check. What's that, and how do I do that?
     
  2. Online

    timtower Administrator Administrator Moderator

    Moved to plugin development
    @BoatWolf, a regular null check. If variable==null
    How depends on your code.
     
  3. Offline

    BoatWolf

    The console says Could not pass inventory click event to duels, so do I show you the code in the console, or one of the config files?

    I don't know how to fix a null value

    Could not pass event InventoryClickEvent to Duels v2.2.2
    org.bukkit.event.EventException
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302) ~[craftbukkit.jar:git-Bukkit-18fbb24]
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[craftbukkit.jar:git-Bukkit-18fbb24]
    at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:501) [craftbukkit.jar:git-Bukkit-18fbb24]
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:486) [craftbukkit.jar:git-Bukkit-18fbb24]
    at net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java:1564) [craftbukkit.jar:git-Bukkit-18fbb24]
    at net.minecraft.server.v1_8_R3.PacketPlayInWindowClick.a(SourceFile:31) [craftbukkit.jar:git-Bukkit-18fbb24]
    at net.minecraft.server.v1_8_R3.PacketPlayInWindowClick.a(SourceFile:9) [craftbukkit.jar:git-Bukkit-18fbb24]
    at net.minecraft.server.v1_8_R3.PlayerConnectionUtils$1.run(SourceFile:13) [craftbukkit.jar:git-Bukkit-18fbb24]
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_111]
    at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_111]
    at net.minecraft.server.v1_8_R3.SystemUtils.a(SourceFile:44) [craftbukkit.jar:git-Bukkit-18fbb24]
    at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:673) [craftbukkit.jar:git-Bukkit-18fbb24]
    at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:335) [craftbukkit.jar:git-Bukkit-18fbb24]
    at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:629) [craftbukkit.jar:git-Bukkit-18fbb24]
    at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:537) [craftbukkit.jar:git-Bukkit-18fbb24]
    at java.lang.Thread.run(Unknown Source) [?:1.8.0_111]
    Caused by: java.lang.NoSuchMethodError: org.bukkit.event.inventory.InventoryClickEvent.getClickedInventory()Lorg/bukkit/inventory/Inventory;
    at me.realized.duels.utilities.gui.GUIManager.on(GUIManager.java:32) ~[?:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_111]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_111]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_111]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_111]
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:300) ~[craftbukkit.jar:git-Bukkit-18fbb24]
    ... 15 more

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jan 7, 2017
  4. Offline

    Zombie_Striker

    @BoatWolf
    Post the code and the error.

    [Edit] this has nothing to do with nullchecks. You're trying to use a method that does not exist.
     
  5. Offline

    BoatWolf

    Where do I get the one I didn't post?
     
Thread Status:
Not open for further replies.

Share This Page