-
-
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
Messages sent in entity right click event default to the clicked entity instead of the player #430
Comments
Are you sure it's not triggering if that's the only code you wrote? It may be trying to send the message to the clicked entity. e.g. In the following scenario:
The player won't see the message (I assume because Skript tries to send to the victim by default, or it silently fails). You have to do Have you tried changing your send line to |
Yup,
works... I never knew the right click on entity works like the damage event... when I've used that same code on older versions of Skript it worked - and also on block right clicks it sends to the player fine... a much more minor bug now that I've figured that out - thanks. |
Very interesting that entity right click defaults to clicked entity. Makes no sense... |
As @TheBentoBox said. Reason behind why this happens: So you have to use the correct Entity. In
The message is being sent to the clicked entity. This is an event-value that is declared/setup like this. -1 takes priotity meaning past state (Which I think clicked entity is set too). You can also use former or future states to grab which enitty you want to message. |
Allright, I have chosen to not change this - even if it would make more sense - to not break a lot existing scripts. |
I've been looking for issues like this thinking someone must be experiencing the same issue, I've seen issues similar but not having the same problem as me
What Happens:
If I click on any entity (mobs, item frames, armour stands, etc...) with this code-
nothing happens. No message or errors in console
What I've Tried:
this will say return none when right clicking blocks but nothing at all when right clicking an entity, no errors in console
I've seen issues like #290 but for me all entity right click events aren't triggering so I don't even get the chance to cancel
The text was updated successfully, but these errors were encountered: