Skip to content

Add PersistentDataContainerView#getSize - #13157

Merged
Owen1212055 merged 3 commits into
PaperMC:mainfrom
zBinFinn:feat/get-persistent-data-container-size
Oct 17, 2025
Merged

Add PersistentDataContainerView#getSize#13157
Owen1212055 merged 3 commits into
PaperMC:mainfrom
zBinFinn:feat/get-persistent-data-container-size

Conversation

@zBinFinn

Copy link
Copy Markdown
Contributor

This PR adds the getSize method to the PersistentDataContainerView

@Strokkur424

Copy link
Copy Markdown
Member

I wonder, what is the use case for such a method?

@zBinFinn

zBinFinn commented Oct 8, 2025

Copy link
Copy Markdown
ContributorAuthor

Need to cap the amount of tags in this case an entity can have (users can give it tags with a custom coding language) to 500, getting the size currently either clones the entire keyset (when using getKeys()) or (what we do atm) you use the underlying bukkit implementation and getRaw() to call .size() on that

Co-authored-by: Warrior <50800980+Warriorrrr@users.noreply.github.com>
@Owen1212055
Owen1212055 merged commit ae1e6b7 into PaperMC:mainOct 17, 2025
4 checks passed
@github-project-automationgithub-project-automationBot moved this from Awaiting review to Merged in Paper PR QueueOct 17, 2025
Sign up for freeto 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.

5 participants

@zBinFinn@Strokkur424@jpenilla@Owen1212055@Warriorrrr