public interface Team
scoreboard
.Modifier and Type | Interface and Description |
---|---|
static class |
Team.Option
Represents an option which may be applied to this team.
|
static class |
Team.OptionStatus
How an option may be applied to members of this team.
|
Modifier and Type | Method and Description |
---|---|
void |
addEntry(@NotNull String entry)
This puts the specified entry onto this team for the scoreboard.
|
void |
addPlayer(@NotNull OfflinePlayer player)
Deprecated.
Teams can contain entries that aren't players
|
boolean |
allowFriendlyFire()
Gets the team friendly fire state
|
boolean |
canSeeFriendlyInvisibles()
Gets the team's ability to see
invisible teammates. |
net.kyori.adventure.text.format.TextColor |
color()
Gets the color of the team.
|
void |
color(net.kyori.adventure.text.format.NamedTextColor color)
Sets the color of the team.
|
net.kyori.adventure.text.Component |
displayName()
Gets the name displayed to entries for this team
|
void |
displayName(net.kyori.adventure.text.Component displayName)
Sets the name displayed to entries for this team
|
@NotNull ChatColor |
getColor()
Deprecated.
in favour of
color() |
@NotNull String |
getDisplayName()
Deprecated.
in favour of
displayName() |
@NotNull Set<String> |
getEntries()
Gets the Set of entries on the team
|
@NotNull String |
getName()
Gets the name of this Team
|
@NotNull NameTagVisibility |
getNameTagVisibility()
Deprecated.
|
@NotNull Team.OptionStatus |
getOption(@NotNull Team.Option option)
Get an option for this team
|
@NotNull Set<OfflinePlayer> |
getPlayers()
Deprecated.
Teams can contain entries that aren't players
|
@NotNull String |
getPrefix()
Deprecated.
in favour of
prefix() |
@Nullable Scoreboard |
getScoreboard()
Gets the Scoreboard to which this team is attached
|
int |
getSize()
Gets the size of the team
|
@NotNull String |
getSuffix()
Deprecated.
in favour of
suffix() |
boolean |
hasEntry(@NotNull String entry)
Checks to see if the specified entry is a member of this team.
|
boolean |
hasPlayer(@NotNull OfflinePlayer player)
Deprecated.
Teams can contain entries that aren't players
|
net.kyori.adventure.text.Component |
prefix()
Gets the prefix prepended to the display of entries on this team.
|
void |
prefix(net.kyori.adventure.text.Component prefix)
Sets the prefix prepended to the display of entries on this team.
|
boolean |
removeEntry(@NotNull String entry)
Removes the entry from this team.
|
boolean |
removePlayer(@NotNull OfflinePlayer player)
Deprecated.
Teams can contain entries that aren't players
|
void |
setAllowFriendlyFire(boolean enabled)
Sets the team friendly fire state
|
void |
setCanSeeFriendlyInvisibles(boolean enabled)
Sets the team's ability to see
invisible teammates. |
void |
setColor(@NotNull ChatColor color)
Deprecated.
|
void |
setDisplayName(@NotNull String displayName)
Deprecated.
in favour of
displayName(net.kyori.adventure.text.Component) |
void |
setNameTagVisibility(@NotNull NameTagVisibility visibility)
|
void |
setOption(@NotNull Team.Option option,
@NotNull Team.OptionStatus status)
Set an option for this team
|
void |
setPrefix(@NotNull String prefix)
Deprecated.
in favour of
prefix(net.kyori.adventure.text.Component) |
void |
setSuffix(@NotNull String suffix)
Deprecated.
in favour of
suffix(net.kyori.adventure.text.Component) |
net.kyori.adventure.text.Component |
suffix()
Gets the suffix appended to the display of entries on this team.
|
void |
suffix(net.kyori.adventure.text.Component suffix)
Sets the suffix appended to the display of entries on this team.
|
void |
unregister()
Unregisters this team from the Scoreboard
|
@NotNull @NotNull String getName() throws IllegalStateException
IllegalStateException
- if this team has been unregistered@NotNull net.kyori.adventure.text.Component displayName() throws IllegalStateException
IllegalStateException
- if this team has been unregisteredvoid displayName(@Nullable net.kyori.adventure.text.Component displayName) throws IllegalStateException, IllegalArgumentException
displayName
- New display nameIllegalArgumentException
- if displayName is longer than 128
characters.IllegalStateException
- if this team has been unregistered@NotNull net.kyori.adventure.text.Component prefix() throws IllegalStateException
IllegalStateException
- if this team has been unregisteredvoid prefix(@Nullable net.kyori.adventure.text.Component prefix) throws IllegalStateException, IllegalArgumentException
prefix
- New prefixIllegalArgumentException
- if prefix is nullIllegalArgumentException
- if prefix is longer than 64
charactersIllegalStateException
- if this team has been unregistered@NotNull net.kyori.adventure.text.Component suffix() throws IllegalStateException
IllegalStateException
- if this team has been unregisteredvoid suffix(@Nullable net.kyori.adventure.text.Component suffix) throws IllegalStateException, IllegalArgumentException
suffix
- the new suffix for this team.IllegalArgumentException
- if suffix is nullIllegalArgumentException
- if suffix is longer than 64
charactersIllegalStateException
- if this team has been unregistered@NotNull net.kyori.adventure.text.format.TextColor color() throws IllegalStateException
ChatColor.RESET
IllegalStateException
- if this team has been unregisteredvoid color(@Nullable net.kyori.adventure.text.format.NamedTextColor color)
color
- new color, must be non-null. Use ChatColor.RESET
for
no color@NotNull @Deprecated @NotNull String getDisplayName() throws IllegalStateException
displayName()
IllegalStateException
- if this team has been unregistered@Deprecated void setDisplayName(@NotNull @NotNull String displayName) throws IllegalStateException, IllegalArgumentException
displayName(net.kyori.adventure.text.Component)
displayName
- New display nameIllegalArgumentException
- if displayName is longer than 128
characters.IllegalStateException
- if this team has been unregistered@NotNull @Deprecated @NotNull String getPrefix() throws IllegalStateException
prefix()
IllegalStateException
- if this team has been unregistered@Deprecated void setPrefix(@NotNull @NotNull String prefix) throws IllegalStateException, IllegalArgumentException
prefix(net.kyori.adventure.text.Component)
prefix
- New prefixIllegalArgumentException
- if prefix is nullIllegalArgumentException
- if prefix is longer than 64
charactersIllegalStateException
- if this team has been unregistered@NotNull @Deprecated @NotNull String getSuffix() throws IllegalStateException
suffix()
IllegalStateException
- if this team has been unregistered@Deprecated void setSuffix(@NotNull @NotNull String suffix) throws IllegalStateException, IllegalArgumentException
suffix(net.kyori.adventure.text.Component)
suffix
- the new suffix for this team.IllegalArgumentException
- if suffix is nullIllegalArgumentException
- if suffix is longer than 64
charactersIllegalStateException
- if this team has been unregistered@NotNull @Deprecated @NotNull ChatColor getColor() throws IllegalStateException
color()
ChatColor.RESET
IllegalStateException
- if this team has been unregistered@Deprecated void setColor(@NotNull @NotNull ChatColor color)
color(net.kyori.adventure.text.format.NamedTextColor)
color
- new color, must be non-null. Use ChatColor.RESET
for
no colorboolean allowFriendlyFire() throws IllegalStateException
IllegalStateException
- if this team has been unregisteredvoid setAllowFriendlyFire(boolean enabled) throws IllegalStateException
enabled
- true if friendly fire is to be allowedIllegalStateException
- if this team has been unregisteredboolean canSeeFriendlyInvisibles() throws IllegalStateException
invisible
teammates.IllegalStateException
- if this team has been unregisteredvoid setCanSeeFriendlyInvisibles(boolean enabled) throws IllegalStateException
invisible
teammates.enabled
- true if invisible teammates are to be visibleIllegalStateException
- if this team has been unregistered@Deprecated @NotNull @NotNull NameTagVisibility getNameTagVisibility() throws IllegalArgumentException
getOption(org.bukkit.scoreboard.Team.Option)
IllegalArgumentException
- if this team has been unregistered@Deprecated void setNameTagVisibility(@NotNull @NotNull NameTagVisibility visibility) throws IllegalArgumentException
setOption(org.bukkit.scoreboard.Team.Option, org.bukkit.scoreboard.Team.OptionStatus)
visibility
- The nameTagVisibility to setIllegalArgumentException
- if this team has been unregistered@Deprecated @NotNull @NotNull Set<OfflinePlayer> getPlayers() throws IllegalStateException
IllegalStateException
- if this team has been unregistered\getEntries()
@NotNull @NotNull Set<String> getEntries() throws IllegalStateException
IllegalStateException
- if this entries has been unregistered\int getSize() throws IllegalStateException
IllegalStateException
- if this team has been unregistered@Nullable @Nullable Scoreboard getScoreboard()
unregistered
@Deprecated void addPlayer(@NotNull @NotNull OfflinePlayer player) throws IllegalStateException, IllegalArgumentException
This will remove the player from any other team on the scoreboard.
player
- the player to addIllegalArgumentException
- if player is nullIllegalStateException
- if this team has been unregisteredaddEntry(String)
void addEntry(@NotNull @NotNull String entry) throws IllegalStateException, IllegalArgumentException
This will remove the entry from any other team on the scoreboard.
entry
- the entry to addIllegalArgumentException
- if entry is nullIllegalStateException
- if this team has been unregistered@Deprecated boolean removePlayer(@NotNull @NotNull OfflinePlayer player) throws IllegalStateException, IllegalArgumentException
player
- the player to removeIllegalArgumentException
- if player is nullIllegalStateException
- if this team has been unregisteredremoveEntry(String)
boolean removeEntry(@NotNull @NotNull String entry) throws IllegalStateException, IllegalArgumentException
entry
- the entry to removeIllegalArgumentException
- if entry is nullIllegalStateException
- if this team has been unregisteredvoid unregister() throws IllegalStateException
IllegalStateException
- if this team has been unregistered@Deprecated boolean hasPlayer(@NotNull @NotNull OfflinePlayer player) throws IllegalArgumentException, IllegalStateException
player
- the player to search forIllegalArgumentException
- if player is nullIllegalStateException
- if this team has been unregisteredhasEntry(String)
boolean hasEntry(@NotNull @NotNull String entry) throws IllegalArgumentException, IllegalStateException
entry
- the entry to search forIllegalArgumentException
- if entry is nullIllegalStateException
- if this team has been unregistered@NotNull @NotNull Team.OptionStatus getOption(@NotNull @NotNull Team.Option option) throws IllegalStateException
option
- the option to getIllegalStateException
- if this team has been unregisteredvoid setOption(@NotNull @NotNull Team.Option option, @NotNull @NotNull Team.OptionStatus status) throws IllegalStateException
option
- the option to setstatus
- the new option statusIllegalStateException
- if this team has been unregisteredCopyright © 2021. All rights reserved.