Module net.minestom.server
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
Gets an iterable of the players this audience contains.default void
hideBossBar
(BossBar bar) static PacketGroupingAudience
of
(Collection<Player> players) Creates a packet grouping audience that copies an iterable of players.default void
default void
playSound
(Sound sound, Sound.Emitter emitter) default void
Plays aSound
at a given pointdefault void
default void
sendActionBar
(Component message) default void
sendGroupedPacket
(ServerPacket packet) Broadcast a ServerPacket to all players of this audiencedefault void
sendMessage
(Identity source, Component message, MessageType type) Deprecated.default void
sendNotification
(Notification notification) Send aNotification
to the audience.default void
sendPlayerListHeaderAndFooter
(Component header, Component footer) default <T> void
sendTitlePart
(TitlePart<T> part, T value) default void
showBossBar
(BossBar bar) default void
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, stopSound
Methods inherited from interface net.kyori.adventure.audience.ForwardingAudience
clearResourcePacks, closeDialog, deleteMessage, filterAudience, forEachAudience, openBook, playSound, pointers, removeResourcePacks, removeResourcePacks, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListHeader, sendResourcePacks, showDialog
Methods 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
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:
sendMessage
in interfaceAudience
- Specified by:
sendMessage
in interfaceForwardingAudience
-
sendActionBar
- Specified by:
sendActionBar
in interfaceAudience
- Specified by:
sendActionBar
in interfaceForwardingAudience
-
sendTitlePart
- Specified by:
sendTitlePart
in interfaceAudience
- Specified by:
sendTitlePart
in interfaceForwardingAudience
-
clearTitle
default void clearTitle()- Specified by:
clearTitle
in interfaceAudience
- Specified by:
clearTitle
in interfaceForwardingAudience
-
resetTitle
default void resetTitle()- Specified by:
resetTitle
in interfaceAudience
- Specified by:
resetTitle
in interfaceForwardingAudience
-
showBossBar
- Specified by:
showBossBar
in interfaceAudience
- Specified by:
showBossBar
in interfaceForwardingAudience
-
hideBossBar
- Specified by:
hideBossBar
in interfaceAudience
- Specified by:
hideBossBar
in interfaceForwardingAudience
-
playSound
Plays aSound
at a given point- Parameters:
sound
- The sound to playpoint
- The point in this instance at which to play the sound
-
playSound
- Specified by:
playSound
in interfaceAudience
- Specified by:
playSound
in interfaceForwardingAudience
-
playSound
- Specified by:
playSound
in interfaceAudience
- Specified by:
playSound
in interfaceForwardingAudience
-
stopSound
- Specified by:
stopSound
in interfaceAudience
- Specified by:
stopSound
in interfaceForwardingAudience
-
sendNotification
Send aNotification
to the audience.- Parameters:
notification
- theNotification
to send
-
audiences
- Specified by:
audiences
in interfaceForwardingAudience
-