public interface Team
scoreboard.| Modifier and Type | Interface | 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 | Description |
|---|---|---|
void |
addEntry(java.lang.String entry) |
This puts the specified entry onto this team for the scoreboard.
|
void |
addPlayer(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. |
ChatColor |
getColor() |
Gets the color of the team.
|
java.lang.String |
getDisplayName() |
Gets the name displayed to entries for this team
|
java.util.Set<java.lang.String> |
getEntries() |
Gets the Set of entries on the team
|
java.lang.String |
getName() |
Gets the name of this Team
|
NameTagVisibility |
getNameTagVisibility() |
Deprecated.
|
Team.OptionStatus |
getOption(Team.Option option) |
Get an option for this team
|
java.util.Set<OfflinePlayer> |
getPlayers() |
Deprecated.
Teams can contain entries that aren't players
|
java.lang.String |
getPrefix() |
Gets the prefix prepended to the display of entries on this team.
|
Scoreboard |
getScoreboard() |
Gets the Scoreboard to which this team is attached
|
int |
getSize() |
Gets the size of the team
|
java.lang.String |
getSuffix() |
Gets the suffix appended to the display of entries on this team.
|
boolean |
hasEntry(java.lang.String entry) |
Checks to see if the specified entry is a member of this team.
|
boolean |
hasPlayer(OfflinePlayer player) |
Deprecated.
Teams can contain entries that aren't players
|
boolean |
removeEntry(java.lang.String entry) |
Removes the entry from this team.
|
boolean |
removePlayer(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(ChatColor color) |
Sets the color of the team.
|
void |
setDisplayName(java.lang.String displayName) |
Sets the name displayed to entries for this team
|
void |
setNameTagVisibility(NameTagVisibility visibility) |
|
void |
setOption(Team.Option option,
Team.OptionStatus status) |
Set an option for this team
|
void |
setPrefix(java.lang.String prefix) |
Sets the prefix prepended to the display of entries on this team.
|
void |
setSuffix(java.lang.String suffix) |
Sets the suffix appended to the display of entries on this team.
|
void |
unregister() |
Unregisters this team from the Scoreboard
|
java.lang.String getName()
throws java.lang.IllegalStateException
java.lang.IllegalStateException - if this team has been unregisteredjava.lang.String getDisplayName()
throws java.lang.IllegalStateException
java.lang.IllegalStateException - if this team has been unregisteredvoid setDisplayName(java.lang.String displayName)
throws java.lang.IllegalStateException,
java.lang.IllegalArgumentException
displayName - New display namejava.lang.IllegalArgumentException - if displayName is longer than 128
characters.java.lang.IllegalStateException - if this team has been unregisteredjava.lang.String getPrefix()
throws java.lang.IllegalStateException
java.lang.IllegalStateException - if this team has been unregisteredvoid setPrefix(java.lang.String prefix)
throws java.lang.IllegalStateException,
java.lang.IllegalArgumentException
prefix - New prefixjava.lang.IllegalArgumentException - if prefix is nulljava.lang.IllegalArgumentException - if prefix is longer than 64
charactersjava.lang.IllegalStateException - if this team has been unregisteredjava.lang.String getSuffix()
throws java.lang.IllegalStateException
java.lang.IllegalStateException - if this team has been unregisteredvoid setSuffix(java.lang.String suffix)
throws java.lang.IllegalStateException,
java.lang.IllegalArgumentException
suffix - the new suffix for this team.java.lang.IllegalArgumentException - if suffix is nulljava.lang.IllegalArgumentException - if suffix is longer than 64
charactersjava.lang.IllegalStateException - if this team has been unregisteredChatColor getColor() throws java.lang.IllegalStateException
ChatColor.RESETjava.lang.IllegalStateExceptionvoid setColor(ChatColor color)
color - new color, must be non-null. Use ChatColor.RESET for
no colorboolean allowFriendlyFire()
throws java.lang.IllegalStateException
java.lang.IllegalStateException - if this team has been unregisteredvoid setAllowFriendlyFire(boolean enabled)
throws java.lang.IllegalStateException
enabled - true if friendly fire is to be allowedjava.lang.IllegalStateException - if this team has been unregisteredboolean canSeeFriendlyInvisibles()
throws java.lang.IllegalStateException
invisible teammates.java.lang.IllegalStateException - if this team has been unregisteredvoid setCanSeeFriendlyInvisibles(boolean enabled)
throws java.lang.IllegalStateException
invisible teammates.enabled - true if invisible teammates are to be visiblejava.lang.IllegalStateException - if this team has been unregistered@Deprecated NameTagVisibility getNameTagVisibility() throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException - if this team has been unregistered@Deprecated void setNameTagVisibility(NameTagVisibility visibility) throws java.lang.IllegalArgumentException
visibility - The nameTagVisibilty to setjava.lang.IllegalArgumentException - if this team has been unregistered@Deprecated java.util.Set<OfflinePlayer> getPlayers() throws java.lang.IllegalStateException
java.lang.IllegalStateException - if this team has been unregistered\getEntries()java.util.Set<java.lang.String> getEntries()
throws java.lang.IllegalStateException
java.lang.IllegalStateException - if this entries has been unregistered\int getSize()
throws java.lang.IllegalStateException
java.lang.IllegalStateException - if this team has been unregisteredScoreboard getScoreboard()
unregistered@Deprecated void addPlayer(OfflinePlayer player) throws java.lang.IllegalStateException, java.lang.IllegalArgumentException
This will remove the player from any other team on the scoreboard.
player - the player to addjava.lang.IllegalArgumentException - if player is nulljava.lang.IllegalStateException - if this team has been unregisteredaddEntry(String)void addEntry(java.lang.String entry)
throws java.lang.IllegalStateException,
java.lang.IllegalArgumentException
This will remove the entry from any other team on the scoreboard.
entry - the entry to addjava.lang.IllegalArgumentException - if entry is nulljava.lang.IllegalStateException - if this team has been unregistered@Deprecated boolean removePlayer(OfflinePlayer player) throws java.lang.IllegalStateException, java.lang.IllegalArgumentException
player - the player to removejava.lang.IllegalArgumentException - if player is nulljava.lang.IllegalStateException - if this team has been unregisteredremoveEntry(String)boolean removeEntry(java.lang.String entry)
throws java.lang.IllegalStateException,
java.lang.IllegalArgumentException
entry - the entry to removejava.lang.IllegalArgumentException - if entry is nulljava.lang.IllegalStateException - if this team has been unregisteredvoid unregister()
throws java.lang.IllegalStateException
java.lang.IllegalStateException - if this team has been unregistered@Deprecated boolean hasPlayer(OfflinePlayer player) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException
player - the player to search forjava.lang.IllegalArgumentException - if player is nulljava.lang.IllegalStateException - if this team has been unregisteredhasEntry(String)boolean hasEntry(java.lang.String entry)
throws java.lang.IllegalArgumentException,
java.lang.IllegalStateException
entry - the entry to search forjava.lang.IllegalArgumentException - if entry is nulljava.lang.IllegalStateException - if this team has been unregisteredTeam.OptionStatus getOption(Team.Option option) throws java.lang.IllegalStateException
option - the option to getjava.lang.IllegalStateException - if this team has been unregisteredvoid setOption(Team.Option option, Team.OptionStatus status) throws java.lang.IllegalStateException
option - the option to setstatus - the new option statusjava.lang.IllegalStateException - if this team has been unregisteredCopyright © 2018. All rights reserved.