Skip to content

Add quota for player arrows that don't auto-despawn - #14145

Closed
samrussell wants to merge 1 commit into
PaperMC:mainfrom
samrussell:main
Closed

Add quota for player arrows that don't auto-despawn#14145
samrussell wants to merge 1 commit into
PaperMC:mainfrom
samrussell:main

Conversation

@samrussell

Copy link
Copy Markdown
Contributor

Addresses #14142

Workaround for #13452 that breaks warden switches. This allows admins to have a quota of arrows for players to use for fair use while still protecting them from mass arrow spam.

Tested locally and confirmed it keeps the first 5 arrows persistent with pistons while the rest despawn.

2026-08-05_22 22 56 2026-08-05_22 23 05

I'm open to taking different approaches with this, I ended up doing a simple counter on ServerPlayer but it gets reset at the start of the entity tick loop in ServerLevel which I don't love. I had tried resetting this when the ServerPlayer gets ticked but the pistons can be put in different orders to change which arrows are in the quota so I couldn't guarantee that it couldn't be abused.

Happy to make changes and re-test locally if you have any requests

Addresses PaperMC#14142

Workaround for PaperMC#13452 that breaks warden switches. This allows admins to have a quota of arrows for players to use for fair use while still protecting them from mass arrow spam.
@samrussell
samrussell requested a review from a team as a code owner August 5, 2026 20:47
@github-project-automation github-project-automation Bot moved this to Awaiting review in Paper PR Queue Aug 5, 2026
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

Please do not open pull requests from the main branch, create a new branch instead.

@github-actions github-actions Bot closed this Aug 5, 2026
@github-project-automation github-project-automation Bot moved this from Awaiting review to Closed in Paper PR Queue Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Closed

Development

Successfully merging this pull request may close these issues.

1 participant