Do not open the GUI when left click and stalk
blablubbabcDEV opened this issue · 5 comments
Migrated from: https://dev.bukkit.org/projects/shopkeepers/issues/528
Originally posted by HackerOTVW (May 24, 2017):
After creating a shopkeeper(version 1.9), I tried to click left while stalking but it did not open the GUI, I could not add items to it.
Please tell me how to fix it.
(My English is not good)
Originally commented by HackerOTVW (May 26, 2017):
After creating a shopkeeper:
[12:20:07 ERROR]: null
  org.bukkit.command.CommandException: Unhandled exception executing command 'shopkeepers' in plugin Shopkeepers v1.75
  at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[spigot-1.9.jar:git-Spigot-1a196e1-6f032cd]
  at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) ~[spigot-1.9.jar:git-Spigot-1a196e1-6f032cd]
  at org.bukkit.craftbukkit.v1_9_R1.CraftServer.dispatchCommand(CraftServer.java:645) ~[spigot-1.9.jar:git-Spigot-1a196e1-6f032cd]
  at net.minecraft.server.v1_9_R1.PlayerConnection.handleCommand(PlayerConnection.java:1302) [spigot-1.9.jar:git-Spigot-1a196e1-  6f032cd]
  at net.minecraft.server.v1_9_R1.PlayerConnection.a(PlayerConnection.java:1137) [spigot-1.9.jar:git-Spigot-1a196e1-6f032cd]
  at net.minecraft.server.v1_9_R1.PacketPlayInChat.a(PacketPlayInChat.java:45) [spigot-1.9.jar:git-Spigot-1a196e1-6f032cd]
  at net.minecraft.server.v1_9_R1.PacketPlayInChat.a(PacketPlayInChat.java:1) [spigot-1.9.jar:git-Spigot-1a196e1-6f032cd]
  at net.minecraft.server.v1_9_R1.PlayerConnectionUtils$1.run(SourceFile:13) [spigot-1.9.jar:git-Spigot-1a196e1-6f032cd]
  at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_60]
  at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_60]
  at net.minecraft.server.v1_9_R1.SystemUtils.a(SourceFile:45) [spigot-1.9.jar:git-Spigot-1a196e1-6f032cd]
  at net.minecraft.server.v1_9_R1.MinecraftServer.D(MinecraftServer.java:721) [spigot-1.9.jar:git-Spigot-1a196e1-6f032cd]
  at net.minecraft.server.v1_9_R1.DedicatedServer.D(DedicatedServer.java:400) [spigot-1.9.jar:git-Spigot-1a196e1-6f032cd]
  at net.minecraft.server.v1_9_R1.MinecraftServer.C(MinecraftServer.java:660) [spigot-1.9.jar:git-Spigot-1a196e1-6f032cd]
  at net.minecraft.server.v1_9_R1.MinecraftServer.run(MinecraftServer.java:559) [spigot-1.9.jar:git-Spigot-1a196e1-6f032cd]
  at java.lang.Thread.run(Unknown Source) [?:1.8.0_60]
Caused by: java.lang.IllegalArgumentException: The validated object is null
  at org.apache.commons.lang.Validate.notNull(Validate.java:192) ~[spigot-1.9.jar:git-Spigot-1a196e1-6f032cd]
  at org.apache.commons.lang.Validate.notNull(Validate.java:178) ~[spigot-1.9.jar:git-Spigot-1a196e1-6f032cd]
  at org.bukkit.craftbukkit.v1_9_R1.entity.CraftVillager.setProfession(CraftVillager.java:46) ~[spigot-1.9.jar:git-Spigot-1a196e1-6f032cd]
  at com.nisovin.shopkeepers.shopobjects.living.VillagerShop.applySubType(VillagerShop.java:64) ~[?:?]
  at com.nisovin.shopkeepers.shopobjects.living.VillagerShop.spawn(VillagerShop.java:54) ~[?:?]
  at com.nisovin.shopkeepers.Shopkeeper.spawn(Shopkeeper.java:211) ~[?:?]
  at com.nisovin.shopkeepers.ShopkeepersPlugin.registerShopkeeper(ShopkeepersPlugin.java:607) ~[?:?]
  at com.nisovin.shopkeepers.ShopType.registerShopkeeper(ShopType.java:62) ~[?:?]
  at com.nisovin.shopkeepers.shoptypes.AdminShopType.createShopkeeper(AdminShopType.java:30) ~[?:?]
  at com.nisovin.shopkeepers.shoptypes.AdminShopType.createShopkeeper(AdminShopType.java:12) ~[?:?]
  at com.nisovin.shopkeepers.ShopkeepersPlugin.createNewAdminShopkeeper(ShopkeepersPlugin.java:918) ~[?:?]
  at com.nisovin.shopkeepers.CommandManager.onCommand(CommandManager.java:763) ~[?:?]
  at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[spigot-1.9.jar:git-Spigot-1a196e1-6f032cd]
  ... 15 more
After left click and stalk:
[12:20:15 ERROR]: Could not pass event PlayerInteractEntityEvent to Shopkeepers v1.75
 org.bukkit.event.EventException
  at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:310) ~[spigot-1.9.jar:git-Spigot-1a196e1-6f032cd]
  at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot-1.9.jar:git-Spigot-1a196e1-6f032cd]
  at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [spigot-1.9.jar:git-Spigot-1a196e1-6f032cd]
  at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [spigot-1.9.jar:git-Spigot-1a196e1-6f032cd]
  at net.minecraft.server.v1_9_R1.PlayerConnection.a(PlayerConnection.java:1484) [spigot-1.9.jar:git-Spigot-1a196e1-6f032cd]
  at net.minecraft.server.v1_9_R1.PacketPlayInUseEntity.a(SourceFile:68) [spigot-1.9.jar:git-Spigot-1a196e1-6f032cd]
  at net.minecraft.server.v1_9_R1.PacketPlayInUseEntity.a(SourceFile:12) [spigot-1.9.jar:git-Spigot-1a196e1-6f032cd]
  at net.minecraft.server.v1_9_R1.PlayerConnectionUtils$1.run(SourceFile:13) [spigot-1.9.jar:git-Spigot-1a196e1-6f032cd]
  at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_60]
  at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_60]
  at net.minecraft.server.v1_9_R1.SystemUtils.a(SourceFile:45) [spigot-1.9.jar:git-Spigot-1a196e1-6f032cd]
  at net.minecraft.server.v1_9_R1.MinecraftServer.D(MinecraftServer.java:721) [spigot-1.9.jar:git-Spigot-1a196e1-6f032cd]
  at net.minecraft.server.v1_9_R1.DedicatedServer.D(DedicatedServer.java:400) [spigot-1.9.jar:git-Spigot-1a196e1-6f032cd]
  at net.minecraft.server.v1_9_R1.MinecraftServer.C(MinecraftServer.java:660) [spigot-1.9.jar:git-Spigot-1a196e1-6f032cd]
  at net.minecraft.server.v1_9_R1.MinecraftServer.run(MinecraftServer.java:559) [spigot-1.9.jar:git-Spigot-1a196e1-6f032cd]
  at java.lang.Thread.run(Unknown Source) [?:1.8.0_60]
Caused by: java.lang.NoSuchMethodError: Â Â org.bukkit.event.player.PlayerInteractEntityEvent.getHand()Lorg/bukkit/inventory/EquipmentSlot;
  at com.nisovin.shopkeepers.compat.v1_9_R1.NMSHandler.isMainHandInteraction(NMSHandler.java:319) ~[?:?]
  at com.nisovin.shopkeepers.VillagerInteractionListener.onEntityInteract(VillagerInteractionListener.java:45) ~[?:?]
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_60]
  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_60]
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_60]
  at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_60]
  at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot-1.9.jar:git-Spigot-1a196e1-6f032cd]
  ... 15 more
Edited May 26, 2017
Originally commented by blablubbabc (May 26, 2017):
Try it with a later version of spigot 1.9.
Edited May 26, 2017
Originally commented by HackerOTVW (May 27, 2017):
Yeah, it worked, thank you
I love it
Edited May 27, 2017
Originally commented by blablubbabc (May 26, 2017):
CHeck your server log. If it says something like 'MethodNotFound' then you need to update your server to a more rcent version of 1.9.
Edited May 26, 2017