Interface PacketGroupingAudience
- All Superinterfaces:
Audience,ForwardingAudience,Pointered
- All Known Subinterfaces:
Scoreboard
- All Known Implementing Classes:
BelowNameTag,Instance,InstanceContainer,SharedInstance,Sidebar,TabList,Team
An audience implementation that sends grouped packets if possible.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.kyori.adventure.audience.ForwardingAudience
ForwardingAudience.Single -
Method Summary
Modifier and TypeMethodDescriptiondefault void@NotNull Collection<@NotNull Player> Gets an iterable of the players this audience contains.default voidhideBossBar(@NotNull BossBar bar) static @NotNull PacketGroupingAudienceof(@NotNull Collection<Player> players) Creates a packet grouping audience that copies an iterable of players.default voiddefault voidplaySound(@NotNull Sound sound, @NotNull Sound.Emitter emitter) default voidPlays aSoundat a given pointdefault voiddefault voidsendActionBar(@NotNull Component message) default voidsendGroupedPacket(@NotNull ServerPacket packet) Broadcast a ServerPacket to all players of this audiencedefault voidsendMessage(@NotNull Identity source, @NotNull Component message, @NotNull MessageType type) Deprecated.default voidsendPlayerListHeaderAndFooter(@NotNull Component header, @NotNull Component footer) default <T> voidsendTitlePart(@NotNull TitlePart<T> part, T value) default voidshowBossBar(@NotNull BossBar bar) default voidMethods 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
@Deprecated default void sendMessage(@NotNull @NotNull Identity source, @NotNull @NotNull Component message, @NotNull @NotNull MessageType type) Deprecated.- Specified by:
sendMessagein interfaceAudience- Specified by:
sendMessagein interfaceForwardingAudience
-
sendActionBar
- Specified by:
sendActionBarin interfaceAudience- Specified by:
sendActionBarin interfaceForwardingAudience
-
sendTitlePart
- Specified by:
sendTitlePartin interfaceAudience- Specified by:
sendTitlePartin interfaceForwardingAudience
-
clearTitle
default void clearTitle()- Specified by:
clearTitlein interfaceAudience- Specified by:
clearTitlein interfaceForwardingAudience
-
resetTitle
default void resetTitle()- Specified by:
resetTitlein interfaceAudience- Specified by:
resetTitlein interfaceForwardingAudience
-
showBossBar
- Specified by:
showBossBarin interfaceAudience- Specified by:
showBossBarin interfaceForwardingAudience
-
hideBossBar
- Specified by:
hideBossBarin interfaceAudience- Specified by:
hideBossBarin interfaceForwardingAudience
-
playSound
Plays aSoundat a given point- Parameters:
sound- The sound to playpoint- The point in this instance at which to play the sound
-
playSound
- Specified by:
playSoundin interfaceAudience- Specified by:
playSoundin interfaceForwardingAudience
-
playSound
- Specified by:
playSoundin interfaceAudience- Specified by:
playSoundin interfaceForwardingAudience
-
stopSound
- Specified by:
stopSoundin interfaceAudience- Specified by:
stopSoundin interfaceForwardingAudience
-
audiences
- Specified by:
audiencesin interfaceForwardingAudience
-