Skip to content

[Fix] Prevent dupe via PlayerDropItemEvent when using /give#12611

Merged
Warriorrrr merged 3 commits into
PaperMC:mainfrom
Rodald:fix-give-duplicate
Jun 7, 2025
Merged

[Fix] Prevent dupe via PlayerDropItemEvent when using /give#12611
Warriorrrr merged 3 commits into
PaperMC:mainfrom
Rodald:fix-give-duplicate

Conversation

@Rodald
Copy link
Copy Markdown
Contributor

@Rodald Rodald commented May 31, 2025

Fixes #12609

Cancelling PlayerDropItemEvent would cause items from /give to be duplicated

@Rodald Rodald requested a review from a team as a code owner May 31, 2025 23:30
@github-project-automation github-project-automation Bot moved this to Awaiting review in Paper PR Queue May 31, 2025
Comment thread paper-server/patches/sources/net/minecraft/server/commands/GiveCommand.java.patch Outdated
@Rodald
Copy link
Copy Markdown
Contributor Author

Rodald commented Jun 1, 2025

I hope that fixes the itemStack and itemStack1 issue.

Please let me know if further changes are needed :D

Comment thread paper-server/patches/sources/net/minecraft/server/commands/GiveCommand.java.patch Outdated
@Rodald
Copy link
Copy Markdown
Contributor Author

Rodald commented Jun 1, 2025

I updated the comments to follow Paper's formatting guidelines.
Let me know if there's anything else I should improve.

@github-project-automation github-project-automation Bot moved this from Awaiting review to Awaiting final testing in Paper PR Queue Jun 4, 2025
@Warriorrrr Warriorrrr merged commit 03efecf into PaperMC:main Jun 7, 2025
3 checks passed
@github-project-automation github-project-automation Bot moved this from Awaiting final testing to Merged in Paper PR Queue Jun 7, 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.

/give duplicates items when PlayerDropItemEvent is cancelled.

4 participants