Package net.minestom.server.scoreboard
Interface Scoreboard
- All Superinterfaces:
Audience
,ForwardingAudience
,PacketGroupingAudience
,Pointered
,Viewable
- All Known Implementing Classes:
BelowNameTag
,Sidebar
,TabList
This interface represents all scoreboard of Minecraft.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.kyori.adventure.audience.ForwardingAudience
ForwardingAudience.Single
-
Method Summary
Modifier and TypeMethodDescriptiondefault @NotNull ScoreboardObjectivePacket
Deprecated.default @NotNull ScoreboardObjectivePacket
Creates a creation objective packet.default @NotNull ScoreboardObjectivePacket
Creates the destruction objective packet.default @NotNull DisplayScoreboardPacket
getDisplayScoreboardPacket
(byte position) Creates theDisplayScoreboardPacket
.@NotNull String
Gets the objective name of the scoreboard.default @NotNull Collection
<Player> Gets an iterable of the players this audience contains.default void
updateScore
(Player player, int score) Updates the score of aPlayer
.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, deleteMessage, filterAudience, forEachAudience, openBook, playSound, pointers, removeResourcePacks, removeResourcePacks, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListHeader, sendResourcePacks
Methods inherited from interface net.minestom.server.adventure.audience.PacketGroupingAudience
audiences, clearTitle, hideBossBar, playSound, playSound, playSound, resetTitle, sendActionBar, sendGroupedPacket, sendMessage, sendPlayerListHeaderAndFooter, sendTitlePart, showBossBar, stopSound
Methods inherited from interface net.kyori.adventure.pointer.Pointered
get, getOrDefault, getOrDefaultFrom
Methods inherited from interface net.minestom.server.Viewable
addViewer, getViewers, getViewersAsAudience, getViewersAsAudiences, isViewer, removeViewer, sendPacketsToViewers, sendPacketsToViewers, sendPacketToViewers, sendPacketToViewersAndSelf
-
Method Details
-
getCreationObjectivePacket
@Deprecated @NotNull default @NotNull ScoreboardObjectivePacket getCreationObjectivePacket(String value, ScoreboardObjectivePacket.Type type) Creates a creation objective packet.- Parameters:
value
- The value for the objectivetype
- The type for the objective- Returns:
- the creation objective packet
-
getCreationObjectivePacket
@NotNull default @NotNull ScoreboardObjectivePacket getCreationObjectivePacket(Component value, ScoreboardObjectivePacket.Type type) Creates a creation objective packet.- Parameters:
value
- The value for the objectivetype
- The type for the objective- Returns:
- the creation objective packet
-
getDestructionObjectivePacket
Creates the destruction objective packet.- Returns:
- the destruction objective packet
-
getDisplayScoreboardPacket
Creates theDisplayScoreboardPacket
.- Parameters:
position
- The position of the scoreboard- Returns:
- the created display scoreboard packet
-
updateScore
Updates the score of aPlayer
.- Parameters:
player
- The playerscore
- The new score
-
getObjectiveName
Gets the objective name of the scoreboard.- Returns:
- the objective name
-
getPlayers
Description copied from interface:PacketGroupingAudience
Gets an iterable of the players this audience contains.- Specified by:
getPlayers
in interfacePacketGroupingAudience
- Returns:
- the connections
-
getCreationObjectivePacket(Component, ScoreboardObjectivePacket.Type)