Interface PacketGroupingAudience
- All Superinterfaces:
net.kyori.adventure.audience.Audience,net.kyori.adventure.audience.ForwardingAudience,net.kyori.adventure.pointer.Pointered
- All Known Subinterfaces:
Scoreboard
- All Known Implementing Classes:
BelowNameTag,Instance,InstanceContainer,SharedInstance,Sidebar,TabList,Team
public interface PacketGroupingAudience
extends net.kyori.adventure.audience.ForwardingAudience
An audience implementation that sends grouped packets if possible.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.kyori.adventure.audience.ForwardingAudience
net.kyori.adventure.audience.ForwardingAudience.Single -
Method Summary
Modifier and TypeMethodDescriptiondefault @NotNull Iterable<? extends net.kyori.adventure.audience.Audience> default void@NotNull Collection<@NotNull Player> Gets an iterable of the players this audience contains.default voidhideBossBar(@NotNull net.kyori.adventure.bossbar.BossBar bar) static @NotNull PacketGroupingAudienceof(@NotNull Collection<Player> players) Creates a packet grouping audience that copies an iterable of players.default voidplaySound(@NotNull net.kyori.adventure.sound.Sound sound, double x, double y, double z) default voidplaySound(@NotNull net.kyori.adventure.sound.Sound sound, @NotNull net.kyori.adventure.sound.Sound.Emitter emitter) default voidPlays aSoundat a given pointdefault voiddefault voidsendActionBar(@NotNull net.kyori.adventure.text.Component message) default voidsendGroupedPacket(@NotNull ServerPacket packet) Broadcast a ServerPacket to all players of this audiencedefault voidsendMessage(@NotNull net.kyori.adventure.identity.Identity source, @NotNull net.kyori.adventure.text.Component message, @NotNull net.kyori.adventure.audience.MessageType type) default voidsendPlayerListHeaderAndFooter(@NotNull net.kyori.adventure.text.Component header, @NotNull net.kyori.adventure.text.Component footer) default <T> voidsendTitlePart(@NotNull net.kyori.adventure.title.TitlePart<T> part, T value) default voidshowBossBar(@NotNull net.kyori.adventure.bossbar.BossBar bar) default voidstopSound(@NotNull net.kyori.adventure.sound.SoundStop stop) Methods inherited from interface net.kyori.adventure.audience.Audience
deleteMessage, openBook, removeResourcePacks, removeResourcePacks, removeResourcePacks, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendResourcePacks, sendResourcePacks, showTitle, stopSoundMethods inherited from interface net.kyori.adventure.audience.ForwardingAudience
clearResourcePacks, deleteMessage, filterAudience, forEachAudience, openBook, playSound, pointers, removeResourcePacks, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListHeader, sendResourcePacksMethods inherited from interface net.kyori.adventure.pointer.Pointered
get, getOrDefault, getOrDefaultFrom
-
Method Details
-
of
Creates a packet grouping audience that copies an iterable of players. The underlying collection is not copied, so changes to the collection will be reflected in the audience.- Parameters:
players- the players- Returns:
- the audience
-
getPlayers
Gets an iterable of the players this audience contains.- Returns:
- the connections
-
sendGroupedPacket
Broadcast a ServerPacket to all players of this audience- Parameters:
packet- the packet to broadcast
-
sendMessage
default void sendMessage(@NotNull @NotNull net.kyori.adventure.identity.Identity source, @NotNull @NotNull net.kyori.adventure.text.Component message, @NotNull @NotNull net.kyori.adventure.audience.MessageType type) - Specified by:
sendMessagein interfacenet.kyori.adventure.audience.Audience- Specified by:
sendMessagein interfacenet.kyori.adventure.audience.ForwardingAudience
-
sendActionBar
default void sendActionBar(@NotNull @NotNull net.kyori.adventure.text.Component message) - Specified by:
sendActionBarin interfacenet.kyori.adventure.audience.Audience- Specified by:
sendActionBarin interfacenet.kyori.adventure.audience.ForwardingAudience
-
sendTitlePart
default <T> void sendTitlePart(@NotNull @NotNull net.kyori.adventure.title.TitlePart<T> part, @NotNull T value) - Specified by:
sendTitlePartin interfacenet.kyori.adventure.audience.Audience- Specified by:
sendTitlePartin interfacenet.kyori.adventure.audience.ForwardingAudience
-
clearTitle
default void clearTitle()- Specified by:
clearTitlein interfacenet.kyori.adventure.audience.Audience- Specified by:
clearTitlein interfacenet.kyori.adventure.audience.ForwardingAudience
-
resetTitle
default void resetTitle()- Specified by:
resetTitlein interfacenet.kyori.adventure.audience.Audience- Specified by:
resetTitlein interfacenet.kyori.adventure.audience.ForwardingAudience
-
showBossBar
default void showBossBar(@NotNull @NotNull net.kyori.adventure.bossbar.BossBar bar) - Specified by:
showBossBarin interfacenet.kyori.adventure.audience.Audience- Specified by:
showBossBarin interfacenet.kyori.adventure.audience.ForwardingAudience
-
hideBossBar
default void hideBossBar(@NotNull @NotNull net.kyori.adventure.bossbar.BossBar bar) - Specified by:
hideBossBarin interfacenet.kyori.adventure.audience.Audience- Specified by:
hideBossBarin interfacenet.kyori.adventure.audience.ForwardingAudience
-
playSound
default void playSound(@NotNull @NotNull net.kyori.adventure.sound.Sound sound, @NotNull @NotNull Point point) Plays aSoundat a given point- Parameters:
sound- The sound to playpoint- The point in this instance at which to play the sound
-
playSound
default void playSound(@NotNull @NotNull net.kyori.adventure.sound.Sound sound, double x, double y, double z) - Specified by:
playSoundin interfacenet.kyori.adventure.audience.Audience- Specified by:
playSoundin interfacenet.kyori.adventure.audience.ForwardingAudience
-
playSound
default void playSound(@NotNull @NotNull net.kyori.adventure.sound.Sound sound, @NotNull net.kyori.adventure.sound.Sound.Emitter emitter) - Specified by:
playSoundin interfacenet.kyori.adventure.audience.Audience- Specified by:
playSoundin interfacenet.kyori.adventure.audience.ForwardingAudience
-
stopSound
default void stopSound(@NotNull @NotNull net.kyori.adventure.sound.SoundStop stop) - Specified by:
stopSoundin interfacenet.kyori.adventure.audience.Audience- Specified by:
stopSoundin interfacenet.kyori.adventure.audience.ForwardingAudience
-
audiences
- Specified by:
audiencesin interfacenet.kyori.adventure.audience.ForwardingAudience
-