Skip to content

Add getPickItem#12552

Merged
lynxplay merged 7 commits into
PaperMC:mainfrom
Reasonlesss:feat/expose-pick-result
May 18, 2025
Merged

Add getPickItem#12552
lynxplay merged 7 commits into
PaperMC:mainfrom
Reasonlesss:feat/expose-pick-result

Conversation

@Reasonlesss
Copy link
Copy Markdown
Contributor

This PR exposes getPickResult to return the item that would be given when the player middle clicks an entity.

@Reasonlesss Reasonlesss requested a review from a team as a code owner May 16, 2025 00:55
@github-project-automation github-project-automation Bot moved this to Awaiting review in Paper PR Queue May 16, 2025
@Doc94
Copy link
Copy Markdown
Member

Doc94 commented May 16, 2025

Welcome :)

not sure about the name, but i dont wanna suggest a thing like getSpawnItem, also for non NMS classes you dont need add the // Paper comments

@Reasonlesss
Copy link
Copy Markdown
Contributor Author

Welcome :)

not sure about the name, but i dont wanna suggest a thing like getSpawnItem, also for non NMS classes you dont need add the // Paper comments

Yea, I was thinking something on the line of getPickItemResult or getPickItem but I'm not sure really what would work for the name could just stick to getPickResult but it seems like a confusing name to me I'm open to suggestions though!

Copy link
Copy Markdown
Member

@kennytv kennytv left a comment

Choose a reason for hiding this comment

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

I feel like I remember another PR adding a method for this but I might just be wrong. pickItem sounds fine

@github-project-automation github-project-automation Bot moved this from Awaiting review to Awaiting final testing in Paper PR Queue May 16, 2025
@notTamion
Copy link
Copy Markdown
Contributor

I feel like I remember another PR adding a method

there was #10215 though that was related to the isPickable stuff which even though having the same name is basically something completely different

Comment thread paper-api/src/main/java/org/bukkit/entity/Entity.java Outdated
@lynxplay lynxplay force-pushed the feat/expose-pick-result branch from 7247f85 to 5f23608 Compare May 18, 2025 18:06
@lynxplay lynxplay merged commit 6f73e62 into PaperMC:main May 18, 2025
3 checks passed
@github-project-automation github-project-automation Bot moved this from Awaiting final testing to Merged in Paper PR Queue May 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Merged

Development

Successfully merging this pull request may close these issues.

6 participants