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 ForwardingAudience
ForwardingAudience.Single -
Method Summary
Modifier and TypeMethodDescriptiondefault voidGets an iterable of the players this audience contains.default voidhideBossBar(BossBar bar) static PacketGroupingAudienceof(Collection<Player> players) Creates a packet grouping audience that copies an iterable of players.default voiddefault voidplaySound(Sound sound, Sound.Emitter emitter) default voidPlays aSoundat a given pointdefault voiddefault voidsendActionBar(Component message) default voidsendGroupedPacket(ServerPacket packet) Broadcast a ServerPacket to all players of this audiencedefault voidsendMessage(Identity source, Component message, MessageType type) Deprecated.default voidsendNotification(Notification notification) Send aNotificationto the audience.default voidsendPlayerListHeaderAndFooter(Component header, Component footer) default <T> voidsendTitlePart(TitlePart<T> part, T value) default voidshowBossBar(BossBar bar) default voidMethods inherited from interface 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 ForwardingAudience
clearResourcePacks, closeDialog, deleteMessage, filterAudience, forEachAudience, openBook, playSound, pointers, removeResourcePacks, removeResourcePacks, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListHeader, sendResourcePacks, showDialogMethods inherited from interface 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
Collection<Player> 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.- 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
-
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
-
sendNotification
Send aNotificationto the audience.- Parameters:
notification- theNotificationto send
-
audiences
- Specified by:
audiencesin interfaceForwardingAudience
-