Skip to content

Add ForwardingViewer #2526

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 26, 2024
Merged

Conversation

MrHell228
Copy link
Contributor

@MrHell228 MrHell228 commented Jun 23, 2024

SpongeAPI | Sponge

ForwardingViewer is some kind of extension of kyori ForwardingAudience idea to sponge Viewer

ForwardingViewer:

  • of(viewersSupplier) is general method to support basically any custom viewers
  • of(Collection<Viewer>) and of(Viewer...) are easy shortcuts for static groups of viewers
  • allAround(world, center, radius) and allAround(entity, radius) are dynamic

Viewer:

  • Removed spawnParticles() that took radius
  • Added (x, y, z) variants for spawnParticles, playMusicDisc and stopMusicDisc, made their (position) variants defaulted
  • Updated some descriptions

@Faithcaio Faithcaio merged commit 54f7a87 into SpongePowered:api-12 Jun 26, 2024
4 checks passed
@MrHell228 MrHell228 deleted the api-12-more-viewers branch June 28, 2024 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants