mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-24 17:11:58 +01:00
Add single Audience getter from Viewable viewers
This commit is contained in:
parent
e738efded3
commit
9490f1f9da
@ -90,7 +90,17 @@ public interface Viewable {
|
||||
*
|
||||
* @return the audience
|
||||
*/
|
||||
default @NotNull Audience getViewersAsAudience() {
|
||||
return Audience.audience(this.getViewersAsAudiences());
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the result of {@link #getViewers()} as an {@link Iterable} of Adventure
|
||||
* {@link Audience}s.
|
||||
*
|
||||
* @return the audiences
|
||||
*/
|
||||
default @NotNull Iterable<? extends Audience> getViewersAsAudiences() {
|
||||
return Collections.unmodifiableSet(this.getViewers());
|
||||
return this.getViewers();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user