Package net.kyori.adventure.audience
Interface ForwardingAudience
- All Superinterfaces:
Audience
- All Known Subinterfaces:
ForwardingAudience.Single
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface ForwardingAudience extends Audience
A receiver that wraps one or more receivers.
ForwardingAudience is designed to easily allow users or
implementations wrap an existing (collection of) Audience(s).
- Since:
- 4.0.0
- See Also:
Audience
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceForwardingAudience.SingleAn audience that forwards everything to a single other audience. -
Method Summary
Modifier and Type Method Description @NonNull Iterable<? extends Audience>audiences()Gets the audiences.default voidclearTitle()Clears the title, if one is being displayed.default voidhideBossBar(@NonNull BossBar bar)Hides a boss bar.default voidopenBook(@NonNull Book book)Opens a book.default voidplaySound(@NonNull Sound sound)Plays a sound.default voidplaySound(@NonNull Sound sound, double x, double y, double z)Plays a sound at a location.default voidresetTitle()Resets the title and timings back to their default.default voidsendActionBar(@NonNull Component message)Sends a message on the action bar.default voidsendMessage(@NonNull Identified source, @NonNull Component message, @NonNull MessageType type)Sends a chat message.default voidsendMessage(@NonNull Identity source, @NonNull Component message, @NonNull MessageType type)Sends a chat message.default voidshowBossBar(@NonNull BossBar bar)Shows a boss bar.default voidshowTitle(@NonNull Title title)Shows a title.default voidstopSound(@NonNull SoundStop stop)Stops a sound, or many sounds.Methods inherited from interface net.kyori.adventure.audience.Audience
openBook, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage
-
Method Details
-
audiences
Gets the audiences.- Returns:
- the audiences
- Since:
- 4.0.0
-
sendMessage
default void sendMessage(@NonNull Identified source, @NonNull Component message, @NonNull MessageType type)Description copied from interface:AudienceSends a chat message.- Specified by:
sendMessagein interfaceAudience- Parameters:
source- the source of the messagemessage- a messagetype- the type- See Also:
Component
-
sendMessage
default void sendMessage(@NonNull Identity source, @NonNull Component message, @NonNull MessageType type)Description copied from interface:AudienceSends a chat message.- Specified by:
sendMessagein interfaceAudience- Parameters:
source- the identity of the source of the messagemessage- a messagetype- the type- See Also:
Component
-
sendActionBar
Description copied from interface:AudienceSends a message on the action bar.- Specified by:
sendActionBarin interfaceAudience- Parameters:
message- a message- See Also:
Component
-
showTitle
Description copied from interface:AudienceShows a title. -
clearTitle
default void clearTitle()Description copied from interface:AudienceClears the title, if one is being displayed.- Specified by:
clearTitlein interfaceAudience- See Also:
Title
-
resetTitle
default void resetTitle()Description copied from interface:AudienceResets the title and timings back to their default.- Specified by:
resetTitlein interfaceAudience- See Also:
Title
-
showBossBar
Description copied from interface:AudienceShows a boss bar.- Specified by:
showBossBarin interfaceAudience- Parameters:
bar- a boss bar- See Also:
BossBar
-
hideBossBar
Description copied from interface:AudienceHides a boss bar.- Specified by:
hideBossBarin interfaceAudience- Parameters:
bar- a boss bar- See Also:
BossBar
-
playSound
Description copied from interface:AudiencePlays a sound. -
playSound
Description copied from interface:AudiencePlays a sound at a location. -
stopSound
Description copied from interface:AudienceStops a sound, or many sounds. -
openBook
Description copied from interface:AudienceOpens a book.When possible, no item should persist after closing the book.
-