Skip to content

Feat: Improve attack cooldown API #12806

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

TauCubed
Copy link

@TauCubed TauCubed commented Jul 6, 2025

This is a small pull that exposes the attackStrengthTicker of nms.LivingEntity through obb.Player.
There isn't currently any point in exposing this through obb.LivingEntity as it isn't currently used anywhere except in nms.Player.
If that changes in the future, moving it to obb.LivingEntity wouldn't break the bytecode of plugins, as obb.Player extends obb.LivingEntity anyway.

This plugs a gap in the API where it currently provides no way of setting the current attack cooldown (without a lot of hackery, at least)

Not sure exactly what to call the methods in their current context. Keeping them similar to their related methods unless anyone can think of better names.

Representing the value as a long rather than an int in the event the underlying field changes to a long.

@TauCubed TauCubed requested a review from a team as a code owner July 6, 2025 05:55
@github-project-automation github-project-automation bot moved this to Awaiting review in Paper PR Queue Jul 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Awaiting review
Development

Successfully merging this pull request may close these issues.

1 participant