AutoReferee  2.5
 All Classes Functions Variables
org.mctourney.autoreferee.AutoRefTeam Class Reference

Represents a collection of players in a match. More...

Inherits org.mctourney.autoreferee.util.Metadatable, and Comparable< AutoRefTeam >.

Inherited by org.mctourney.autoreferee.FreeForAllTeam.

Public Member Functions

void addExpectedPlayer (OfflinePlayer opl)
 Adds a player to the list of expected players for this team.
 
void addExpectedPlayer (String name)
 Adds a player to the list of expected players for this team by name.
 
void addGoal (Element elt)
 Sets a new win condition.
 
void addGoal (AutoRefGoal goal)
 Sets a new win condition.
 
void addSpawnRegion (AutoRefRegion reg)
 Adds to this team's spawn locations.
 
void addSpawnRegion (Location loc)
 Adds to this team's spawn locations.
 
boolean canEnter (Location loc)
 Checks if players on this team can be in a given location, including sneak distance. More...
 
boolean canEnter (Location loc, Double distance)
 Checks if players on this team can be in a given location, within a specified distance. More...
 
void clearSpawnRegions ()
 Clears this team's spawn locations.
 
double distanceToClosestRegion (Location loc)
 Returns distance from location to this team's closest region. More...
 
ChatColor getColor ()
 Gets the color associated with this team.
 
String getDefaultName ()
 Gets the default name of the team.
 
String getDisplayName ()
 Gets the colored name of the team.
 
Set< String > getExpectedPlayers ()
 Gets the players expected to join this team. More...
 
Location getLastObjectiveLocation ()
 Gets location of this team's last objective event.
 
AutoRefMatch getMatch ()
 Gets this team's match. More...
 
String getName ()
 Gets the name of the team.
 
Set< BlockDatagetObjectives ()
 Gets a list of team objectives for this match. More...
 
AutoRefPlayer getPlayer (String name)
 Gets a player from this team by name. More...
 
AutoRefPlayer getPlayer (Player player)
 Gets a player from this team associated with the specified player. More...
 
Set< AutoRefPlayergetPlayers ()
 Gets the members of this team. More...
 
Set< AutoRefRegion > getRegions ()
 Gets all regions owned by this team. More...
 
Location getSpawnLocation ()
 Gets a valid spawn location for this team.
 
Set< AutoRefGoalgetTeamGoals ()
 Get this team's win conditions. More...
 
Location getVictoryMonumentLocation ()
 Gets location of this team's victory monument. More...
 
boolean hasFlag (Block b, AutoRefRegion.Flag flag)
 Checks if a region is marked with a specific region flag. More...
 
boolean hasFlag (Block b, AutoRefRegion.Flag flag, boolean def)
 Checks if a region is marked with a specific region flag. More...
 
boolean hasFlag (Location loc, AutoRefRegion.Flag flag)
 Checks if a region is marked with a specific region flag. More...
 
boolean hasFlag (Location loc, AutoRefRegion.Flag flag, boolean def)
 Checks if a region is marked with a specific region flag. More...
 
boolean isEmptyTeam ()
 Checks whether this team is empty. More...
 
boolean isReady ()
 Checks if this team is ready for the match to begin. More...
 
boolean join (Player player, PlayerTeamJoinEvent.Reason reason)
 Adds a player to this team. More...
 
boolean join (Player player, PlayerTeamJoinEvent.Reason reason, boolean force)
 Adds a player to this team. More...
 
boolean leave (Player player)
 Removes a player from this team. More...
 
boolean leave (Player player, boolean force)
 Removes a player from this team. More...
 
boolean leaveQuietly (Player player)
 Removes a player from this team quietly. More...
 
void setColor (ChatColor color)
 Sets the color associated with this team.
 
void setName (String name)
 Sets the name of the team. More...
 
void setReady (boolean ready)
 Sets whether this team is ready for the match to begin.
 

Static Public Member Functions

static void switchTeams (AutoRefTeam team1, AutoRefTeam team2)
 Swap the configuration of two teams, including players and custom names.
 

Detailed Description

Represents a collection of players in a match.

Author
authorblues

Member Function Documentation

boolean org.mctourney.autoreferee.AutoRefTeam.canEnter ( Location  loc)

Checks if players on this team can be in a given location, including sneak distance.

Returns
true if location is valid, otherwise false
boolean org.mctourney.autoreferee.AutoRefTeam.canEnter ( Location  loc,
Double  distance 
)

Checks if players on this team can be in a given location, within a specified distance.

Parameters
distancemaximum distance a player may move from this location
Returns
true if location is valid, otherwise false
double org.mctourney.autoreferee.AutoRefTeam.distanceToClosestRegion ( Location  loc)

Returns distance from location to this team's closest region.

Returns
distance
Set<String> org.mctourney.autoreferee.AutoRefTeam.getExpectedPlayers ( )

Gets the players expected to join this team.

Returns
collection of players
AutoRefMatch org.mctourney.autoreferee.AutoRefTeam.getMatch ( )

Gets this team's match.

Returns
match object
Set<BlockData> org.mctourney.autoreferee.AutoRefTeam.getObjectives ( )

Gets a list of team objectives for this match.

Returns
collection of block types to be retrieved
AutoRefPlayer org.mctourney.autoreferee.AutoRefTeam.getPlayer ( String  name)

Gets a player from this team by name.

Returns
player object if one exists, otherwise null
AutoRefPlayer org.mctourney.autoreferee.AutoRefTeam.getPlayer ( Player  player)

Gets a player from this team associated with the specified player.

Returns
player object if one exists, otherwise null
Set<AutoRefPlayer> org.mctourney.autoreferee.AutoRefTeam.getPlayers ( )

Gets the members of this team.

Returns
collection of players
Set<AutoRefRegion> org.mctourney.autoreferee.AutoRefTeam.getRegions ( )

Gets all regions owned by this team.

Returns
collection of regions
Set<AutoRefGoal> org.mctourney.autoreferee.AutoRefTeam.getTeamGoals ( )

Get this team's win conditions.

Returns
collection of win conditions
Location org.mctourney.autoreferee.AutoRefTeam.getVictoryMonumentLocation ( )

Gets location of this team's victory monument.

Victory monument location is synthesized based on objective target locations.

boolean org.mctourney.autoreferee.AutoRefTeam.hasFlag ( Block  b,
AutoRefRegion.Flag  flag 
)

Checks if a region is marked with a specific region flag.

Returns
true if location contains flag, otherwise false
boolean org.mctourney.autoreferee.AutoRefTeam.hasFlag ( Block  b,
AutoRefRegion.Flag  flag,
boolean  def 
)

Checks if a region is marked with a specific region flag.

Returns
true if location contains flag, otherwise false
boolean org.mctourney.autoreferee.AutoRefTeam.hasFlag ( Location  loc,
AutoRefRegion.Flag  flag 
)

Checks if a region is marked with a specific region flag.

Returns
true if location contains flag, otherwise false
boolean org.mctourney.autoreferee.AutoRefTeam.hasFlag ( Location  loc,
AutoRefRegion.Flag  flag,
boolean  def 
)

Checks if a region is marked with a specific region flag.

Returns
true if location contains flag, otherwise false
boolean org.mctourney.autoreferee.AutoRefTeam.isEmptyTeam ( )

Checks whether this team is empty.

Takes expected players into account.

Returns
true if team is empty, otherwise false
boolean org.mctourney.autoreferee.AutoRefTeam.isReady ( )

Checks if this team is ready for the match to begin.

Returns
true if team is ready, otherwise false
boolean org.mctourney.autoreferee.AutoRefTeam.join ( Player  player,
PlayerTeamJoinEvent.Reason  reason 
)

Adds a player to this team.

Players may not be added to teams if the match is already in progress.

Returns
true if player was successfully added, otherwise false
boolean org.mctourney.autoreferee.AutoRefTeam.join ( Player  player,
PlayerTeamJoinEvent.Reason  reason,
boolean  force 
)

Adds a player to this team.

Parameters
forceforce join operation, even if match is in progress
Returns
true if player was successfully added, otherwise false
boolean org.mctourney.autoreferee.AutoRefTeam.leave ( Player  player)

Removes a player from this team.

Players may not be removed from teams if the match is already in progress.

Returns
true if player was successfully removed, otherwise false
boolean org.mctourney.autoreferee.AutoRefTeam.leave ( Player  player,
boolean  force 
)

Removes a player from this team.

Parameters
forceforce leave operation, even if match is in progress
Returns
true if player was successfully removed, otherwise false
boolean org.mctourney.autoreferee.AutoRefTeam.leaveQuietly ( Player  player)

Removes a player from this team quietly.

Returns
true if player was successfully removed, otherwise false
void org.mctourney.autoreferee.AutoRefTeam.setName ( String  name)

Sets the name of the team.

Parameters
namenew team name

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