Skip to content

Add API for nms Player.canCriticalAttack(Entity)#13915

Open
LeonTG wants to merge 2 commits into
PaperMC:mainfrom
LeonTG:can-crit-api
Open

Add API for nms Player.canCriticalAttack(Entity)#13915
LeonTG wants to merge 2 commits into
PaperMC:mainfrom
LeonTG:can-crit-api

Conversation

@LeonTG
Copy link
Copy Markdown

@LeonTG LeonTG commented May 26, 2026

I also added this to my own Paper fork, and again figured it was nice API for others to use too

@LeonTG LeonTG requested a review from a team as a code owner May 26, 2026 20:01
@github-project-automation github-project-automation Bot moved this to Awaiting review in Paper PR Queue May 26, 2026
Comment thread paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java Outdated
* @param entity target entity to check if can critical attack.
* @return Whether they can critical attack the target entity.
*/
public boolean canCriticalAttack(Entity entity);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

im not sure about the name also based in NMS this is not the full logic for consider its a critical (fullStrengthAttack in NMS) so maybe you can mention in the docs...

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can add the fullStrengthAttack logic too if you want?

it would defo make more sense in the way I use this API in my own project to also account for that

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm i fell can be good expose that

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure I know what you mean by that ngl xd

Co-authored-by: Pedro <3602279+Doc94@users.noreply.github.com>
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.

2 participants