-
-
Notifications
You must be signed in to change notification settings - Fork 382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rightclick event not being called for villagers #290
Comments
It is known that right click events are very occasionally not working correctly. Click events are handled by hand-written lookup table (what was clicked? what player had in both hands?), and that is far from perfect solution. |
I didn't know that. Thank you for clarification.
In this example, the player always receives the message and the five dirts. |
Oh, then it is something new. If you can catch the event, you should be able to cancel it... I hope Spigot 1.11 didn't change anything significant here. |
I hope so too. Thank you for your concern. |
code:
This code stopped working properly when i updated to dev22f however now the event is no longer canceled and the map is placed in the item frame after the player gets sent the message. |
I also confirm it.
When I have an item and right click on an empty item frame, the item will be put in the item frame and the message will be given to player. |
Bump? |
@JeepSmash Just so you guys know I encountered this problem a bit ago as well but I just used Skellet as a hacky workaround to fix the problem
This will put the rotation back to it's previous state when someone attempts to rotate the only problem is you can see people attempting to rotate but I don't find that to be a major issue |
Just tried cancelling "on right click on villager", sadly isnt working either. dev25. Any chance to fix this? anything else works i just cant cancel it so bump i guess |
Literally calling event.setCancelled(true) doesn't work, so I have no more ideas... |
"on left click on villager" doesn't work for me :( |
@ChimpGamer You shouldn't use "left click" on entities since that's a damage event, use |
Ow, sorry. But I have to use "left click". Because a Shop is on that Villager (plugin) and it uses left click to open the shop. (Can't change button). And with Skript I'm trying to set a permission on that. |
Left clicking a villager IS a damage event, that's what I'm saying. There's no difference between the two aside from the fact that the damage event is the correct one to use. If you want to detect players left clicking a villager, use the damage event. If canceling that doesn't work, then that's the fault of your shop plugin, and not something Skript can do anything about. And again, this isn't the place to talk about this, as it's not relevant to this issue. If you want more help trying to figure out a way around that, go ask on the skUnity forums, not here. |
Can someone confirm this is still an issue? |
It's still an issue in dev35 |
Thanks for the #273 fix.
But I just noticed that some rightclik events can't be cancelled anymore by the "cancel event" command.
Actually, it fails for villagers (I need to hide their shops GUI) and item frames (I need to avoid the items rotation)
The text was updated successfully, but these errors were encountered: