Replies: 2 comments
-
Somewhat related to #8751, idk if we need both issues open. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I think they can both remain open as they are asking for different things, but like the other issue, this would require a rather large refactor of how itemstack's are damaged, as currently that info isn't available where the event is called. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is your feature request related to a problem?
PlayerItemDamageEvent should have some of
getCause
method.That way you could e.g. cancel axe damage for PvP, but not for mining.
Describe the solution you'd like.
The solution would be to just add an enum
ItemDamageCause
with the possible causes for item damage.Causes would be
ENTITY
,BLOCK
,CUSTOM
,PLUGIN
,UNKNOWN
.Describe alternatives you've considered.
You can achieve something similar using
EntityDamageByEntityEvent
,BlockBreakEvent
and a map, but that seems hacky.Other
No response
Beta Was this translation helpful? Give feedback.
All reactions