Skip to content
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

Adding a way to get the amount of item damage in an "on item damage" event. #5258

Closed
1 task done
Dago-Duck opened this issue Dec 22, 2022 · 0 comments
Closed
1 task done
Labels
completed The issue has been fully resolved and the change will be in the next Skript update. enhancement Feature request, an issue about something that could be improved, or a PR improving something. priority: lowest "Nice to have" updates that are not required (tiny low impact bug fixes or QoL enhancements).

Comments

@Dago-Duck
Copy link

Suggestion

I'm suggesting the addition of the getDamage() method in the org.bukkit.event.player.PlayerItemDamageEvent as a vanilla skript expression.

It could be the same as in an on damage event, for example instead of:
on damage:
if damage is more than 1:
send "ouch" to victim

it would be something like:
on item damage:
if item damage is 0:
send "Unbreaking has triggered" to player

Why?

Currently there is no way to differentiate between unbreaking "blocking" the 1 item damage of the item, and just the usual durability reduction without using skript-reflect!

Other

Agreement

  • I have read the guidelines above and affirm I am following them with this suggestion.
@TheLimeGlass TheLimeGlass added enhancement Feature request, an issue about something that could be improved, or a PR improving something. priority: lowest "Nice to have" updates that are not required (tiny low impact bug fixes or QoL enhancements). good first issue An issue that would be good for a first-time contributor to make a PR for labels Dec 22, 2022
@TheLimeGlass TheLimeGlass added PR available Issues which have a yet-to-be merged PR resolving it and removed good first issue An issue that would be good for a first-time contributor to make a PR for labels Dec 24, 2022
@APickledWalrus APickledWalrus added completed The issue has been fully resolved and the change will be in the next Skript update. and removed PR available Issues which have a yet-to-be merged PR resolving it labels Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
completed The issue has been fully resolved and the change will be in the next Skript update. enhancement Feature request, an issue about something that could be improved, or a PR improving something. priority: lowest "Nice to have" updates that are not required (tiny low impact bug fixes or QoL enhancements).
Projects
None yet
Development

No branches or pull requests

3 participants