Package net.kyori.adventure.audience
Interface ForwardingAudience.Single
- All Superinterfaces:
Audience
,ForwardingAudience
- 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.ForwardingAudience
ForwardingAudience.Single
-
Method Summary
Modifier and Type Method Description @NonNull Audience
audience()
Gets the audience.default @NonNull Iterable<? extends Audience>
audiences()
Deprecated.this audience only supports forwarding to a single audiencedefault void
clearTitle()
Clears the title, if one is being displayed.default void
hideBossBar(@NonNull BossBar bar)
Hides a boss bar.default void
openBook(@NonNull Book book)
Opens a book.default void
playSound(@NonNull Sound sound)
Plays a sound.default void
playSound(@NonNull Sound sound, double x, double y, double z)
Plays a sound at a location.default void
resetTitle()
Resets the title and timings back to their default.default void
sendActionBar(@NonNull Component message)
Sends a message on the action bar.default void
sendMessage(@NonNull Identified source, @NonNull Component message, @NonNull MessageType type)
Sends a chat message.default void
sendMessage(@NonNull Identity source, @NonNull Component message, @NonNull MessageType type)
Sends a chat message.default void
sendPlayerListFooter(@NonNull Component footer)
Sends the player list footer.default void
sendPlayerListHeader(@NonNull Component header)
Sends the player list header.default void
sendPlayerListHeaderAndFooter(@NonNull Component header, @NonNull Component footer)
Sends the player list header and footer.default void
showBossBar(@NonNull BossBar bar)
Shows a boss bar.default void
showTitle(@NonNull Title title)
Shows a title.default void
stopSound(@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, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeaderAndFooter
-
Method Details
-
audience
Gets the audience.- Returns:
- the audience
- Since:
- 4.0.0
-
audiences
Deprecated.this audience only supports forwarding to a single audienceGets the audiences.- Specified by:
audiences
in interfaceForwardingAudience
- Returns:
audience()
-
sendMessage
default void sendMessage(@NonNull Identified source, @NonNull Component message, @NonNull MessageType type)Description copied from interface:Audience
Sends a chat message.- Specified by:
sendMessage
in interfaceAudience
- Specified by:
sendMessage
in interfaceForwardingAudience
- 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:Audience
Sends a chat message.- Specified by:
sendMessage
in interfaceAudience
- Specified by:
sendMessage
in interfaceForwardingAudience
- Parameters:
source
- the identity of the source of the messagemessage
- a messagetype
- the type- See Also:
Component
-
sendActionBar
Description copied from interface:Audience
Sends a message on the action bar.- Specified by:
sendActionBar
in interfaceAudience
- Specified by:
sendActionBar
in interfaceForwardingAudience
- Parameters:
message
- a message- See Also:
Component
-
sendPlayerListHeader
Description copied from interface:Audience
Sends 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:
sendPlayerListHeader
in interfaceAudience
- Specified by:
sendPlayerListHeader
in interfaceForwardingAudience
- Parameters:
header
- the header
-
showTitle
Description copied from interface:Audience
Shows a title.- Specified by:
showTitle
in interfaceAudience
- Specified by:
showTitle
in interfaceForwardingAudience
- Parameters:
title
- a title- See Also:
Title
-
clearTitle
default void clearTitle()Description copied from interface:Audience
Clears the title, if one is being displayed.- Specified by:
clearTitle
in interfaceAudience
- Specified by:
clearTitle
in interfaceForwardingAudience
- See Also:
Title
-
resetTitle
default void resetTitle()Description copied from interface:Audience
Resets the title and timings back to their default.- Specified by:
resetTitle
in interfaceAudience
- Specified by:
resetTitle
in interfaceForwardingAudience
- See Also:
Title
-
showBossBar
Description copied from interface:Audience
Shows a boss bar.- Specified by:
showBossBar
in interfaceAudience
- Specified by:
showBossBar
in interfaceForwardingAudience
- Parameters:
bar
- a boss bar- See Also:
BossBar
-
hideBossBar
Description copied from interface:Audience
Hides a boss bar.- Specified by:
hideBossBar
in interfaceAudience
- Specified by:
hideBossBar
in interfaceForwardingAudience
- Parameters:
bar
- a boss bar- See Also:
BossBar
-
playSound
Description copied from interface:Audience
Plays a sound.- Specified by:
playSound
in interfaceAudience
- Specified by:
playSound
in interfaceForwardingAudience
- Parameters:
sound
- a sound- See Also:
Sound
-
playSound
Description copied from interface:Audience
Plays a sound at a location.- Specified by:
playSound
in interfaceAudience
- Specified by:
playSound
in interfaceForwardingAudience
- Parameters:
sound
- a soundx
- x coordinatey
- y coordinatez
- z coordinate- See Also:
Sound
-
stopSound
Description copied from interface:Audience
Stops a sound, or many sounds.- Specified by:
stopSound
in interfaceAudience
- Specified by:
stopSound
in interfaceForwardingAudience
- Parameters:
stop
- a sound stop- See Also:
SoundStop
-
openBook
Description copied from interface:Audience
Opens a book.When possible, no item should persist after closing the book.
- Specified by:
openBook
in interfaceAudience
- Specified by:
openBook
in interfaceForwardingAudience
- Parameters:
book
- a book- See Also:
Book
-