Interface ForwardingAudience.Single
- 
- All Superinterfaces:
- Audience,- ForwardingAudience,- Pointered
 - Enclosing interface:
- ForwardingAudience
 
 public static interface ForwardingAudience.Single extends ForwardingAudience An audience that forwards everything to a single other audience.- Since:
- 4.0.0
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface net.kyori.adventure.audience.ForwardingAudienceForwardingAudience.Single
 
- 
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description @NotNull Audienceaudience()Gets the audience.default @NotNull java.lang.Iterable<? extends Audience>audiences()Deprecated.this audience only supports forwarding to a single audiencedefault voidclearResourcePacks()Clear all server-provided resource packs that have been sent to this user.default voidclearTitle()Clears the title, if one is being displayed.default voiddeleteMessage(@NotNull SignedMessage.Signature signature)Requests deletion of a message with the providedSignedMessage.Signature.default @NotNull AudiencefilterAudience(@NotNull java.util.function.Predicate<? super Audience> filter)Filters this audience.default voidforEachAudience(@NotNull java.util.function.Consumer<? super Audience> action)Executes an action against all audiences.default <T> @NotNull java.util.Optional<T>get(@NotNull Pointer<T> pointer)Gets the value ofpointer.default <T> TgetOrDefault(@NotNull Pointer<T> pointer, T defaultValue)Gets the value ofpointer.default <T> @UnknownNullability TgetOrDefaultFrom(@NotNull Pointer<T> pointer, @NotNull java.util.function.Supplier<? extends T> defaultValue)Gets the value ofpointer.default voidhideBossBar(@NotNull BossBar bar)Hides a boss bar.default voidopenBook(@NotNull Book book)Opens a book.default voidplaySound(@NotNull Sound sound)Plays a sound at the location of the recipient of the sound.default voidplaySound(@NotNull Sound sound, double x, double y, double z)Plays a sound at a location.default voidplaySound(@NotNull Sound sound, @NotNull Sound.Emitter emitter)Plays a sound from an emitter, usually an entity.default @NotNull Pointerspointers()Gets the pointers for this object.default voidremoveResourcePacks(@NotNull java.lang.Iterable<java.util.UUID> ids)Clear resource packs with the provided ids if they are present.default voidremoveResourcePacks(@NotNull java.util.UUID id, @NotNull java.util.UUID @NotNull ... others)Clear resource packs with the provided ids if they are present.default voidresetTitle()Resets the title and timings back to their default.default voidsendActionBar(@NotNull Component message)Sends a message on the action bar.default voidsendMessage(@NotNull SignedMessage signedMessage, @NotNull ChatType.Bound boundChatType)Sends a signed player message to thisAudiencewith the providedbound chat type.default voidsendMessage(@NotNull Identified source, @NotNull Component message, @NotNull MessageType type)Deprecated.default voidsendMessage(@NotNull Identity source, @NotNull Component message, @NotNull MessageType type)Deprecated.default voidsendMessage(@NotNull Component message)Sends a system chat message to thisAudience.default voidsendMessage(@NotNull Component message, @NotNull ChatType.Bound boundChatType)Sends a message to thisAudiencewith the providedbound chat type.default voidsendPlayerListFooter(@NotNull Component footer)Sends the player list footer.default voidsendPlayerListHeader(@NotNull Component header)Sends the player list header.default voidsendPlayerListHeaderAndFooter(@NotNull Component header, @NotNull Component footer)Sends the player list header and footer.default voidsendResourcePacks(@NotNull ResourcePackRequest request)Sends a request to apply resource packs to this audience.default <T> voidsendTitlePart(@NotNull TitlePart<T> part, T value)Shows a part of a title.default voidshowBossBar(@NotNull BossBar bar)Shows a boss bar.default voidstopSound(@NotNull SoundStop stop)Stops a sound, or many sounds.- 
Methods inherited from interface net.kyori.adventure.audience.AudiencedeleteMessage, openBook, removeResourcePacks, removeResourcePacks, removeResourcePacks, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendResourcePacks, sendResourcePacks, showTitle, stopSound
 
- 
 
- 
- 
- 
Method Detail- 
audience@OverrideOnly @NotNull @NotNull Audience audience() Gets the audience.- Returns:
- the audience
- Since:
- 4.0.0
 
 - 
audiences@Deprecated @NotNull default @NotNull java.lang.Iterable<? extends Audience> audiences() Deprecated.this audience only supports forwarding to a single audienceGets the audiences.- Specified by:
- audiencesin interface- ForwardingAudience
- Returns:
- audience()
 
 - 
get@NotNull default <T> @NotNull java.util.Optional<T> get(@NotNull @NotNull Pointer<T> pointer)Description copied from interface:PointeredGets the value ofpointer.
 - 
getOrDefault@Contract("_, null -> null; _, !null -> !null") @Nullable default <T> T getOrDefault(@NotNull @NotNull Pointer<T> pointer, @Nullable T defaultValue)Description copied from interface:PointeredGets the value ofpointer.If this Audienceis unable to provide a value forpointer,defaultValuewill be returned.- Specified by:
- getOrDefaultin interface- Pointered
- Type Parameters:
- T- the type
- Parameters:
- pointer- the pointer
- defaultValue- the default value
- Returns:
- the value
 
 - 
getOrDefaultFromdefault <T> @UnknownNullability T getOrDefaultFrom(@NotNull @NotNull Pointer<T> pointer, @NotNull @NotNull java.util.function.Supplier<? extends T> defaultValue)Description copied from interface:PointeredGets the value ofpointer.If this Audienceis unable to provide a value forpointer, the value supplied bydefaultValuewill be returned.- Specified by:
- getOrDefaultFromin interface- Pointered
- Type Parameters:
- T- the type
- Parameters:
- pointer- the pointer
- defaultValue- the default value supplier
- Returns:
- the value
 
 - 
filterAudience@NotNull default @NotNull Audience filterAudience(@NotNull @NotNull java.util.function.Predicate<? super Audience> filter) Description copied from interface:AudienceFilters this audience.The returned Audiencemay be the same, or a completely different one.Container audiences such as ForwardingAudiencemay or may not have their own identity. If they do, they may test themselves against the providedfilterfirst, and if the test fails return an empty audience skipping any contained children. If they do not, they must not test themselves against the filter, only testing their children.- Specified by:
- filterAudiencein interface- Audience
- Specified by:
- filterAudiencein interface- ForwardingAudience
- Parameters:
- filter- a filter that determines if an audience should be included
- Returns:
- an audience providing a snapshot of all audiences that match the predicate when this method is invoked
 
 - 
forEachAudiencedefault void forEachAudience(@NotNull @NotNull java.util.function.Consumer<? super Audience> action)Description copied from interface:AudienceExecutes an action against all audiences.If you implement Audienceand notForwardingAudiencein your own code, and your audience forwards to other audiences, then you must override this method and provide each audience toaction.If an implementation of Audiencehas its own identity distinct from its contained children, it may test itself against the providedfilterfirst, and if the test fails return an empty audience skipping any contained children. If it does not, it must not test itself against the filter, only testing its children.- Specified by:
- forEachAudiencein interface- Audience
- Specified by:
- forEachAudiencein interface- ForwardingAudience
- Parameters:
- action- the action
 
 - 
pointers@NotNull default @NotNull Pointers pointers() Description copied from interface:PointeredGets the pointers for this object.- Specified by:
- pointersin interface- ForwardingAudience
- Specified by:
- pointersin interface- Pointered
- Returns:
- the pointers
 
 - 
sendMessagedefault void sendMessage(@NotNull @NotNull Component message)Description copied from interface:AudienceSends a system chat message to thisAudience.- Specified by:
- sendMessagein interface- Audience
- Specified by:
- sendMessagein interface- ForwardingAudience
- Parameters:
- message- a message
- See Also:
- Component,- Audience.sendMessage(Identified, Component),- Audience.sendMessage(Identity, Component)
 
 - 
sendMessagedefault void sendMessage(@NotNull @NotNull Component message, @NotNull ChatType.Bound boundChatType)Description copied from interface:AudienceSends a message to thisAudiencewith the providedbound chat type.- Specified by:
- sendMessagein interface- Audience
- Specified by:
- sendMessagein interface- ForwardingAudience
- Parameters:
- message- the component content
- boundChatType- the bound chat type
 
 - 
sendMessagedefault void sendMessage(@NotNull @NotNull SignedMessage signedMessage, @NotNull ChatType.Bound boundChatType)Description copied from interface:AudienceSends a signed player message to thisAudiencewith the providedbound chat type.- Specified by:
- sendMessagein interface- Audience
- Specified by:
- sendMessagein interface- ForwardingAudience
- Parameters:
- signedMessage- the signed message data
- boundChatType- the bound chat type
 
 - 
deleteMessagedefault void deleteMessage(@NotNull SignedMessage.Signature signature) Description copied from interface:AudienceRequests deletion of a message with the providedSignedMessage.Signature.- Specified by:
- deleteMessagein interface- Audience
- Specified by:
- deleteMessagein interface- ForwardingAudience
- Parameters:
- signature- the signature
 
 - 
sendMessage@Deprecated default void sendMessage(@NotNull @NotNull Identified source, @NotNull @NotNull Component message, @NotNull @NotNull MessageType type)Deprecated.Description copied from interface:AudienceSends an unsigned player chat message from the givenIdentifiedto thisAudiencewith theChatTypecorresponding to the providedMessageType.- Specified by:
- sendMessagein interface- Audience
- Specified by:
- sendMessagein interface- ForwardingAudience
- Parameters:
- source- the source of the message
- message- a message
- type- the type
- See Also:
- Component
 
 - 
sendMessage@Deprecated default void sendMessage(@NotNull @NotNull Identity source, @NotNull @NotNull Component message, @NotNull @NotNull MessageType type)Deprecated.Description copied from interface:AudienceSends a player chat message from the entity represented by the givenIdentityto thisAudiencewith theChatTypecorresponding to the providedMessageType.- Specified by:
- sendMessagein interface- Audience
- Specified by:
- sendMessagein interface- ForwardingAudience
- Parameters:
- source- the identity of the source of the message
- message- a message
- type- the type
- See Also:
- Component
 
 - 
sendActionBardefault void sendActionBar(@NotNull @NotNull Component message)Description copied from interface:AudienceSends a message on the action bar.- Specified by:
- sendActionBarin interface- Audience
- Specified by:
- sendActionBarin interface- ForwardingAudience
- Parameters:
- message- a message
- See Also:
- Component
 
 - 
sendPlayerListHeaderdefault void sendPlayerListHeader(@NotNull @NotNull Component header)Description copied from interface:AudienceSends the player list header.Depending on the implementation of this Audience, an existing footer may be displayed. If you wish to set both the header and the footer, please useAudience.sendPlayerListHeaderAndFooter(Component, Component).- Specified by:
- sendPlayerListHeaderin interface- Audience
- Specified by:
- sendPlayerListHeaderin interface- ForwardingAudience
- Parameters:
- header- the header
 
 - 
sendPlayerListFooterdefault void sendPlayerListFooter(@NotNull @NotNull Component footer)Description copied from interface:AudienceSends the player list footer.Depending on the implementation of this Audience, an existing footer may be displayed. If you wish to set both the header and the footer, please useAudience.sendPlayerListHeaderAndFooter(Component, Component).- Specified by:
- sendPlayerListFooterin interface- Audience
- Specified by:
- sendPlayerListFooterin interface- ForwardingAudience
- Parameters:
- footer- the footer
 
 - 
sendPlayerListHeaderAndFooterdefault void sendPlayerListHeaderAndFooter(@NotNull @NotNull Component header, @NotNull @NotNull Component footer)Description copied from interface:AudienceSends the player list header and footer.- Specified by:
- sendPlayerListHeaderAndFooterin interface- Audience
- Specified by:
- sendPlayerListHeaderAndFooterin interface- ForwardingAudience
- Parameters:
- header- the header
- footer- the footer
 
 - 
sendTitlePartdefault <T> void sendTitlePart(@NotNull @NotNull TitlePart<T> part, @NotNull T value)Description copied from interface:AudienceShows a part of a title.- Specified by:
- sendTitlePartin interface- Audience
- Specified by:
- sendTitlePartin interface- ForwardingAudience
- Type Parameters:
- T- the type of the value of the part
- Parameters:
- part- the part
- value- the value
 
 - 
clearTitledefault void clearTitle() Description copied from interface:AudienceClears the title, if one is being displayed.- Specified by:
- clearTitlein interface- Audience
- Specified by:
- clearTitlein interface- ForwardingAudience
- See Also:
- Title
 
 - 
resetTitledefault void resetTitle() Description copied from interface:AudienceResets the title and timings back to their default.- Specified by:
- resetTitlein interface- Audience
- Specified by:
- resetTitlein interface- ForwardingAudience
- See Also:
- Title
 
 - 
showBossBardefault void showBossBar(@NotNull @NotNull BossBar bar)Description copied from interface:AudienceShows a boss bar.- Specified by:
- showBossBarin interface- Audience
- Specified by:
- showBossBarin interface- ForwardingAudience
- Parameters:
- bar- a boss bar
- See Also:
- BossBar
 
 - 
hideBossBardefault void hideBossBar(@NotNull @NotNull BossBar bar)Description copied from interface:AudienceHides a boss bar.- Specified by:
- hideBossBarin interface- Audience
- Specified by:
- hideBossBarin interface- ForwardingAudience
- Parameters:
- bar- a boss bar
- See Also:
- BossBar
 
 - 
playSounddefault void playSound(@NotNull @NotNull Sound sound)Description copied from interface:AudiencePlays a sound at the location of the recipient of the sound.To play a sound that follows the recipient, use Audience.playSound(Sound, Sound.Emitter)withSound.Emitter.self().- Specified by:
- playSoundin interface- Audience
- Specified by:
- playSoundin interface- ForwardingAudience
- Parameters:
- sound- a sound
- See Also:
- Sound
 
 - 
playSounddefault void playSound(@NotNull @NotNull Sound sound, double x, double y, double z)Description copied from interface:AudiencePlays a sound at a location.- Specified by:
- playSoundin interface- Audience
- Specified by:
- playSoundin interface- ForwardingAudience
- Parameters:
- sound- a sound
- x- x coordinate
- y- y coordinate
- z- z coordinate
- See Also:
- Sound
 
 - 
playSounddefault void playSound(@NotNull @NotNull Sound sound, @NotNull Sound.Emitter emitter)Description copied from interface:AudiencePlays a sound from an emitter, usually an entity.Sounds played using this method will follow the emitter unless the sound is a custom sound. In this case the sound will be played at the location of the emitter and will not follow them. To play a sound that follows the recipient, use Sound.Emitter.self().Note: Due to MC-138832, the volume and pitch may be ignored when using this method. - Specified by:
- playSoundin interface- Audience
- Specified by:
- playSoundin interface- ForwardingAudience
- Parameters:
- sound- a sound
- emitter- an emitter
 
 - 
stopSounddefault void stopSound(@NotNull @NotNull SoundStop stop)Description copied from interface:AudienceStops a sound, or many sounds.- Specified by:
- stopSoundin interface- Audience
- Specified by:
- stopSoundin interface- ForwardingAudience
- Parameters:
- stop- a sound stop
- See Also:
- SoundStop
 
 - 
openBookdefault void openBook(@NotNull @NotNull Book book)Description copied from interface:AudienceOpens a book.When possible, no item should persist after closing the book. - Specified by:
- openBookin interface- Audience
- Specified by:
- openBookin interface- ForwardingAudience
- Parameters:
- book- a book
- See Also:
- Book
 
 - 
sendResourcePacksdefault void sendResourcePacks(@NotNull @NotNull ResourcePackRequest request)Description copied from interface:AudienceSends a request to apply resource packs to this audience.Multiple resource packs are only supported since 1.20.3. On older versions, all requests behave as if ResourcePackRequest.replace()is set totrue.- Specified by:
- sendResourcePacksin interface- Audience
- Specified by:
- sendResourcePacksin interface- ForwardingAudience
- Parameters:
- request- the resource pack request
- See Also:
- ResourcePackInfo
 
 - 
removeResourcePacksdefault void removeResourcePacks(@NotNull @NotNull java.lang.Iterable<java.util.UUID> ids)Description copied from interface:AudienceClear resource packs with the provided ids if they are present.- Specified by:
- removeResourcePacksin interface- Audience
- Specified by:
- removeResourcePacksin interface- ForwardingAudience
- Parameters:
- ids- the ids of resource packs to remove
 
 - 
removeResourcePacksdefault void removeResourcePacks(@NotNull @NotNull java.util.UUID id, @NotNull @NotNull java.util.UUID @NotNull ... others)Description copied from interface:AudienceClear resource packs with the provided ids if they are present.- Specified by:
- removeResourcePacksin interface- Audience
- Specified by:
- removeResourcePacksin interface- ForwardingAudience
- Parameters:
- id- the id
- others- the ids of any additional resource packs
 
 - 
clearResourcePacksdefault void clearResourcePacks() Description copied from interface:AudienceClear all server-provided resource packs that have been sent to this user.- Specified by:
- clearResourcePacksin interface- Audience
- Specified by:
- clearResourcePacksin interface- ForwardingAudience
 
 
- 
 
-