SpongePowered / SpongeAPI

A Minecraft plugin API
http://www.spongepowered.org/
MIT License
1.14k stars 342 forks source link

Filter or only display particles to certain players #1889

Open LJNIC opened 6 years ago

LJNIC commented 6 years ago

There doesn't seem to be anything related to this in the Viewer interface. Is this functionality possible?

ryantheleach commented 6 years ago

Not currently in the API. IMO it's kind of weird that the Viewer interfaces show it to all nearby players, I would have expected spawning particles in the world to do that, not spawning them on a viewer.

https://github.com/SpongePowered/SpongeAPI/blob/a1418ae3fccbfa1fbc56e05d2f3375dcd1344e1c/src/main/java/org/spongepowered/api/effect/Viewer.java#L49-L68

Cybermaxke commented 6 years ago

Every Player is a Viewer, so you can just send it to a specific player.

LJNIC commented 6 years ago

In that case the docs should reflect the difference between players and worlds.

ryantheleach commented 6 years ago

(I know it's not entirely relevant to the API, but this is possible with vanilla commands in 1.12 (as of which version it was possible, I'm not sure))

/particle angryVillager ~ ~ ~ 1 1 1 1 1 normal ewoutvs_ Will show a particle around the command source, that only shows to ewoutvs_ .

I feel like the location for the behavior of showing particles to users is definitely on the Viewer interface, and fits this message signature, but the JD are "wrong", and the current behavior is "wrong" in that it matches the JD.

Edit:

Sorry, my bad, retested, particles are "Correctly" shown to only this viewer using this method, just tested this with simonflash.

image

It's only the JD that need fixing.

LJNIC commented 6 years ago

I assume this goes for all Viewer methods, @ryantheleach?