@NonnullByDefault public interface ScoreboardTeam
Scoreboard.| Modifier and Type | Interface and Description |
|---|---|
static class |
ScoreboardTeam.CollisionRule |
static class |
ScoreboardTeam.NameTagVisibility |
| Modifier and Type | Method and Description |
|---|---|
default boolean |
addPlayer(Player player)
Adds a player to this team
|
boolean |
addPlayer(String player)
Adds a player to this team
|
ScoreboardTeam.CollisionRule |
getCollisionRule()
Gets the current collision rule setting
|
ChatColor |
getColor()
Gets the team color.
|
String |
getDisplayName()
Gets the current display name of this team
|
String |
getId()
Gets the id of this team
|
ScoreboardTeam.NameTagVisibility |
getNameTagVisibility()
Gets the current nametag visibility setting
|
Set<String> |
getPlayers()
Gets an immutable copy of the teams members
|
String |
getPrefix()
Gets the current prefix for this team
|
String |
getSuffix()
Gets the current suffix for this team
|
default boolean |
hasPlayer(Player player)
Returns true if the given player is a member of this team
|
boolean |
hasPlayer(String player)
Returns true if the given player is a member of this team
|
boolean |
isAllowFriendlyFire()
Gets if friendly fire is allowed
|
boolean |
isCanSeeFriendlyInvisibles()
Gets if members of this team can see invisible members on the same team
|
default boolean |
removePlayer(Player player)
Removes a player from this team
|
boolean |
removePlayer(String player)
Removes a player from this team
|
void |
setAllowFriendlyFire(boolean allowFriendlyFire)
Lazily sets the friendly fire setting to new value and updates the teams subscribers
|
void |
setAutoSubscribe(boolean autoSubscribe)
Sets if players should be automatically subscribed to this team.
|
void |
setCanSeeFriendlyInvisibles(boolean canSeeFriendlyInvisibles)
Lazily sets the friendly invisibility setting to new value and updates the teams subscribers
|
void |
setCollisionRule(ScoreboardTeam.CollisionRule collisionRule)
Lazily sets the collision rule setting to new value and updates the teams subscribers
|
void |
setColor(ChatColor color)
Sets the teams color.
|
void |
setDisplayName(String displayName)
Lazily sets the display name to a new value and updates the teams subscribers
|
void |
setNameTagVisibility(ScoreboardTeam.NameTagVisibility nameTagVisibility)
Lazily sets the nametag visibility setting to new value and updates the teams subscribers
|
void |
setPrefix(String prefix)
Lazily sets the prefix to a new value and updates the teams subscribers
|
void |
setSuffix(String suffix)
Lazily sets the suffix to a new value and updates the teams subscribers
|
boolean |
shouldAutoSubscribe()
Gets if players should be automatically subscribed to this team.
|
void |
subscribe(Player player)
Subscribes a player to this team
|
void |
unsubscribe(Player player)
Unsubscribes a player from this team
|
void |
unsubscribe(Player player,
boolean fast)
Unsubscribes a player from this team
|
void |
unsubscribeAll()
Unsubscribes all players from this team
|
String getId()
boolean shouldAutoSubscribe()
void setAutoSubscribe(boolean autoSubscribe)
autoSubscribe - if players should be automatically subscribedString getDisplayName()
void setDisplayName(String displayName)
displayName - the new display nameString getPrefix()
void setPrefix(String prefix)
prefix - the new prefixString getSuffix()
void setSuffix(String suffix)
suffix - the new suffixboolean isAllowFriendlyFire()
void setAllowFriendlyFire(boolean allowFriendlyFire)
allowFriendlyFire - the new settingboolean isCanSeeFriendlyInvisibles()
void setCanSeeFriendlyInvisibles(boolean canSeeFriendlyInvisibles)
canSeeFriendlyInvisibles - the new settingScoreboardTeam.NameTagVisibility getNameTagVisibility()
void setNameTagVisibility(ScoreboardTeam.NameTagVisibility nameTagVisibility)
nameTagVisibility - the new settingScoreboardTeam.CollisionRule getCollisionRule()
void setCollisionRule(ScoreboardTeam.CollisionRule collisionRule)
collisionRule - the new settingChatColor getColor()
ChatColor.RESET by default.void setColor(ChatColor color)
color - the new colorboolean addPlayer(String player)
player - the player to addboolean removePlayer(String player)
player - the player to removeboolean hasPlayer(String player)
player - the player to check fordefault boolean addPlayer(Player player)
player - the player to adddefault boolean removePlayer(Player player)
player - the player to removedefault boolean hasPlayer(Player player)
player - the player to check forSet<String> getPlayers()
void subscribe(Player player)
player - the player to subscribevoid unsubscribe(Player player)
player - the player to unsubscribevoid unsubscribe(Player player, boolean fast)
player - the player to unsubscribefast - if true, the removal packet will not be sent (for use when the player is leaving)void unsubscribeAll()
Copyright © 2020. All rights reserved.