Package net.minestom.server.scoreboard
Class BelowNameTag
java.lang.Object
net.minestom.server.scoreboard.BelowNameTag
- All Implemented Interfaces:
Audience
,ForwardingAudience
,Pointered
,PacketGroupingAudience
,Scoreboard
,Viewable
Represents a scoreboard which rendered a tag below the name.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.kyori.adventure.audience.ForwardingAudience
ForwardingAudience.Single
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
WARNING: You shouldn't create scoreboards with the same prefix as those -
Constructor Summary
ConstructorDescriptionBelowNameTag
(String name, Component value) Creates a new below name scoreboard. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Adds a viewer.@NotNull String
Gets the objective name of the scoreboard.Gets all the viewers of this viewable element.boolean
removeViewer
(@NotNull Player player) Removes a viewer.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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, 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.scoreboard.Scoreboard
getCreationObjectivePacket, getDestructionObjectivePacket, getDisplayScoreboardPacket, getPlayers, updateScore
Methods inherited from interface net.minestom.server.Viewable
getViewersAsAudience, getViewersAsAudiences, isViewer, sendPacketsToViewers, sendPacketsToViewers, sendPacketToViewers, sendPacketToViewersAndSelf
-
Field Details
-
BELOW_NAME_TAG_PREFIX
WARNING: You shouldn't create scoreboards with the same prefix as those- See Also:
-
-
Constructor Details
-
BelowNameTag
Creates a new below name scoreboard.- Parameters:
name
- The objective name of the scoreboardvalue
- The value of the scoreboard
-
-
Method Details
-
getObjectiveName
Description copied from interface:Scoreboard
Gets the objective name of the scoreboard.- Specified by:
getObjectiveName
in interfaceScoreboard
- Returns:
- the objective name
-
addViewer
Description copied from interface:Viewable
Adds a viewer. -
removeViewer
Description copied from interface:Viewable
Removes a viewer.- Specified by:
removeViewer
in interfaceViewable
- Parameters:
player
- the viewer to remove- Returns:
- true if the player has been removed, false otherwise (could be because he was not a viewer)
-
getViewers
Description copied from interface:Viewable
Gets all the viewers of this viewable element.- Specified by:
getViewers
in interfaceViewable
- Returns:
- A Set containing all the element's viewers
-