-
-
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
on break event for item frames and paintings and more #892
Comments
Item frames and paintings should not use on break events since they are entities and not blocks. They are covered by the on damage event. Regarding item frames: On right click events are not called if players click on item frames making it impossible to stop players from placing items in empty frames or rotating the items in frames. This was reported 10 months ago and hasn't been fixed #290
|
Yeah, you shouldn't be using |
Using |
After doing some more testing with this stuff regarding item frames and paintings: 1 'on break' is called when a item frame/painting breaks If trying to detect players breaking an item frame the only thing i can think of is using the on 'break event' and looping the players in a 5 block radius around the event-entity (the max distance a player can hit an entity from with their hands). But if multiple players are in that radius there is no way to know which unless you check their targeted entity/block but if they are causing the damage from a farther distance with a projectile/piston/liquid/etc there is no 100% sure way to tell until something here is fixed. It would be nice if both 'on break' and 'on damage' events were called for the case of the item frame and painting so players could use which ever meets their needs best. But at this point at least one is needed to be able to detect a player breaking those entities properly. |
the only way to prevent this is to use HangingBreakEvent and/or HangingBreakByEntityEvent |
Still having the issue today with the latest version |
I fixed it by using BlockBreakEvent instead of "break" |
using the on break: event
and breaking an item frame triggers the event but player isn't set
same goes for paintings
and event-block / event-item are both not set either
mc 1.12.1
skript 2.2-dev29
The text was updated successfully, but these errors were encountered: