ItemJoin

ItemJoin

157k Downloads

PlayerInteractEvent (MC 1.7)

FireFliesMC opened this issue ยท 6 comments

commented

PlayerInteractEvent

When I try to have an item execute a command, I get an exception and the command doesn't register.
Minecraft version: 1.7
ItemJoin version: 3.7

Exception: [20:51:09 ERROR]: Could not pass event PlayerInteractEvent to ItemJoin v3.8 org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja va:302) ~[spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav a:62) ~[spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95] at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.j ava:509) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j ava:494) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95] at org.bukkit.craftbukkit.v1_7_R4.event.CraftEventFactory.callPlayerInte ractEvent(CraftEventFactory.java:242) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f 2e95] at org.bukkit.craftbukkit.v1_7_R4.event.CraftEventFactory.callPlayerInte ractEvent(CraftEventFactory.java:212) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f 2e95] at net.minecraft.server.v1_7_R4.PlayerConnection.a(PlayerConnection.java :636) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95] at net.minecraft.server.v1_7_R4.PacketPlayInBlockPlace.a(PacketPlayInBlo ckPlace.java:50) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95] at net.minecraft.server.v1_7_R4.PacketPlayInBlockPlace.handle(PacketPlay InBlockPlace.java:86) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95] at net.minecraft.server.v1_7_R4.NetworkManager.a(NetworkManager.java:186 ) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95] at net.minecraft.server.v1_7_R4.ServerConnection.c(ServerConnection.java :81) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95] at net.minecraft.server.v1_7_R4.MinecraftServer.v(MinecraftServer.java:7 34) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95] at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:2 89) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95] at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:5 84) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95] at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java :490) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95] at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:6 28) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95] Caused by: java.lang.NoSuchMethodError: org.bukkit.entity.Player.getLineOfSight( Ljava/util/Set;I)Ljava/util/List; at me.RockinChaos.itemjoin.Listeners.InteractCmds.getNearestEntityInSigh t(InteractCmds.java:60) ~[?:?] at me.RockinChaos.itemjoin.Listeners.InteractCmds.onInteractCmds(Interac tCmds.java:47) ~[?:?] 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.ja va:298) ~[spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95] ... 15 more

commented

Thanks for posting this here, I replied to you on spigot.

Hmmm interesting. I will bug test this. Its probably just a string of code I have to put a version checker infront of so if its 1.7 that it will disable.

It doesnt look to be related to books though because my special event for the %hitplayer% is triggered.
me.RockinChaos.itemjoin.Listeners.InteractCmds.getNearestEntityInSight(InteractCmds.java:60) ~[?:?]
which caches the player you are looking at.

Can you please provide your items.yml and config.yml in a pastebin.com? Thanks and ill get right on fixing this for v3.9.

commented

Thanks so much! And no it's not only the books, commands that are bound to an item cannot be ran because of this playerinteractevent. Look in my items list for the "leaveitem" which is supposed to kick players when they click it.

Also, would it be possible to have to feature to "reload" the items when players join? Since I might have to update my books, I would like players to automatically get the new version when they join. (I don't know if this feature is clear-only-itemjoin-on-join, if I set it to true it just removes all the items)

Here's my items: http://pastebin.com/JPfH4XjF
Here's my config: http://pastebin.com/1KLQxdf5

commented

As long as clear-only-itemjoin-on-join: true is the only one set to true it will clear all itemjoin only items. I cannot make it so the config reloads every time a player joins because with enough traffic it crashes servers. It causes major lag to keep loading in the items that why its only generated once on boot. There is a /itemjoin reload command that refreshes the config files and updates the items to match just like you were asking for when a player joins, you just got to run the command.

Thanks for the information I will get this bug tested and fixed for the v3.9 update that will be coming out soon.

commented

Alright thanks! So if I update a book then run the reload command, it would update for everyone once they join? If so that's great. And I just noticed that the PlayerInteractEvent exception shows everytime a player clicks, so when I join my hub with itemjoin enabled, everytime I click even without and item in my hand it would run the exception.

commented

Just fixed a whole LOT of bugs with v1.7 im supprised I havent gotten reports sooner. ItemJoin v3.9 has a lot of work arounds for minecraft v1.7 until I can get v4.0 of ItemJoin out. It will still run flawlessly though. Ill post here when i post the update.

commented

ItemJoin v3.9 has been released and fixes this issue.
You can download it here; https://www.spigotmc.org/resources/itemjoin.12661/download?version=139837
If you have anymore problems feel free to open another bug report.