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 ScoreboardObjectivePacketCreates a creation objective packet.default @NotNull ScoreboardObjectivePacketCreates the destruction objective packet.default @NotNull DisplayScoreboardPacketgetDisplayScoreboardPacket(byte position) Creates theDisplayScoreboardPacket.@NotNull StringGets the objective name of the scoreboard.default @NotNull Collection<Player> Gets an iterable of the players this audience contains.default voidupdateScore(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, 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.minestom.server.adventure.audience.PacketGroupingAudience
audiences, clearTitle, hideBossBar, playSound, playSound, playSound, resetTitle, sendActionBar, sendGroupedPacket, sendMessage, sendPlayerListHeaderAndFooter, sendTitlePart, showBossBar, stopSoundMethods inherited from interface net.kyori.adventure.pointer.Pointered
get, getOrDefault, getOrDefaultFromMethods inherited from interface net.minestom.server.Viewable
addViewer, getViewers, getViewersAsAudience, getViewersAsAudiences, isViewer, removeViewer, sendPacketsToViewers, sendPacketsToViewers, sendPacketToViewers, sendPacketToViewersAndSelf
-
Method Details
-
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:PacketGroupingAudienceGets an iterable of the players this audience contains.- Specified by:
getPlayersin interfacePacketGroupingAudience- Returns:
- the connections
-