Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
org.bukkit.scoreboard.Team Interface Reference

Public Member Functions

String getName () throws IllegalStateException
 
String getDisplayName () throws IllegalStateException
 
void setDisplayName (String displayName) throws IllegalStateException, IllegalArgumentException
 
String getPrefix () throws IllegalStateException
 
void setPrefix (String prefix) throws IllegalStateException, IllegalArgumentException
 
String getSuffix () throws IllegalStateException
 
void setSuffix (String suffix) throws IllegalStateException, IllegalArgumentException
 
boolean allowFriendlyFire () throws IllegalStateException
 
void setAllowFriendlyFire (boolean enabled) throws IllegalStateException
 
boolean canSeeFriendlyInvisibles () throws IllegalStateException
 
void setCanSeeFriendlyInvisibles (boolean enabled) throws IllegalStateException
 
Set< OfflinePlayergetPlayers () throws IllegalStateException
 
int getSize () throws IllegalStateException
 
Scoreboard getScoreboard ()
 
void addPlayer (OfflinePlayer player) throws IllegalStateException, IllegalArgumentException
 
boolean removePlayer (OfflinePlayer player) throws IllegalStateException, IllegalArgumentException
 
void unregister () throws IllegalStateException
 
boolean hasPlayer (OfflinePlayer player) throws IllegalArgumentException, IllegalStateException
 

Detailed Description

A team on a scoreboard that has a common display theme and other properties. This team is only relevant to the display of the associated scoreboard.

Definition at line 13 of file Team.java.

Member Function Documentation

void org.bukkit.scoreboard.Team.addPlayer ( OfflinePlayer  player) throws IllegalStateException, IllegalArgumentException

This puts the specified player onto this team for the scoreboard.

This will remove the player from any other team on the scoreboard.

Parameters
playerthe player to add
Exceptions
IllegalArgumentExceptionif player is null
IllegalStateExceptionif this team has been unregistered
boolean org.bukkit.scoreboard.Team.allowFriendlyFire ( ) throws IllegalStateException

Gets the team friendly fire state

Returns
true if friendly fire is enabled
Exceptions
IllegalStateExceptionif this team has been unregistered
boolean org.bukkit.scoreboard.Team.canSeeFriendlyInvisibles ( ) throws IllegalStateException

Gets the team's ability to see invisible teammates.

Returns
true if team members can see invisible members
Exceptions
IllegalStateExceptionif this team has been unregistered
String org.bukkit.scoreboard.Team.getDisplayName ( ) throws IllegalStateException

Gets the name displayed to players for this team

Returns
Team display name
Exceptions
IllegalStateExceptionif this team has been unregistered
String org.bukkit.scoreboard.Team.getName ( ) throws IllegalStateException

Gets the name of this Team

Returns
Objective name
Exceptions
IllegalStateExceptionif this team has been unregistered
Set<OfflinePlayer> org.bukkit.scoreboard.Team.getPlayers ( ) throws IllegalStateException

Gets the Set of players on the team

Returns
players on the team
Exceptions
IllegalStateExceptionif this team has been unregistered
String org.bukkit.scoreboard.Team.getPrefix ( ) throws IllegalStateException

Gets the prefix prepended to the display of players on this team.

Returns
Team prefix
Exceptions
IllegalStateExceptionif this team has been unregistered
Scoreboard org.bukkit.scoreboard.Team.getScoreboard ( )

Gets the Scoreboard to which this team is attached

Returns
Owning scoreboard, or null if this team has been unregistered
int org.bukkit.scoreboard.Team.getSize ( ) throws IllegalStateException

Gets the size of the team

Returns
number of players on the team
Exceptions
IllegalStateExceptionif this team has been unregistered
String org.bukkit.scoreboard.Team.getSuffix ( ) throws IllegalStateException

Gets the suffix appended to the display of players on this team.

Returns
the team's current suffix
Exceptions
IllegalStateExceptionif this team has been unregistered
boolean org.bukkit.scoreboard.Team.hasPlayer ( OfflinePlayer  player) throws IllegalArgumentException, IllegalStateException

Checks to see if the specified player is a member of this team.

Parameters
playerthe player to search for
Returns
true if the player is a member of this team
Exceptions
IllegalArgumentExceptionif player is null
IllegalStateExceptionif this team has been unregistered
boolean org.bukkit.scoreboard.Team.removePlayer ( OfflinePlayer  player) throws IllegalStateException, IllegalArgumentException

Removes the player from this team.

Parameters
playerthe player to remove
Returns
if the player was on this team
Exceptions
IllegalArgumentExceptionif player is null
IllegalStateExceptionif this team has been unregistered
void org.bukkit.scoreboard.Team.setAllowFriendlyFire ( boolean  enabled) throws IllegalStateException

Sets the team friendly fire state

Parameters
enabledtrue if friendly fire is to be allowed
Exceptions
IllegalStateExceptionif this team has been unregistered
void org.bukkit.scoreboard.Team.setCanSeeFriendlyInvisibles ( boolean  enabled) throws IllegalStateException

Sets the team's ability to see invisible teammates.

Parameters
enabledtrue if invisible teammates are to be visible
Exceptions
IllegalStateExceptionif this team has been unregistered
void org.bukkit.scoreboard.Team.setDisplayName ( String  displayName) throws IllegalStateException, IllegalArgumentException

Sets the name displayed to players for this team

Parameters
displayNameNew display name
Exceptions
IllegalArgumentExceptionif displayName is longer than 32 characters.
IllegalStateExceptionif this team has been unregistered
void org.bukkit.scoreboard.Team.setPrefix ( String  prefix) throws IllegalStateException, IllegalArgumentException

Sets the prefix prepended to the display of players on this team.

Parameters
prefixNew prefix
Exceptions
IllegalArgumentExceptionif prefix is null
IllegalArgumentExceptionif prefix is longer than 16 characters
IllegalStateExceptionif this team has been unregistered
void org.bukkit.scoreboard.Team.setSuffix ( String  suffix) throws IllegalStateException, IllegalArgumentException

Sets the suffix appended to the display of players on this team.

Parameters
suffixthe new suffix for this team.
Exceptions
IllegalArgumentExceptionif suffix is null
IllegalArgumentExceptionif suffix is longer than 16 characters
IllegalStateExceptionif this team has been unregistered
void org.bukkit.scoreboard.Team.unregister ( ) throws IllegalStateException

Unregisters this team from the Scoreboard

Exceptions
IllegalStateExceptionif this team has been unregistered

The documentation for this interface was generated from the following file: