AutoReferee
2.5
|
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< BlockData > | getObjectives () |
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< AutoRefPlayer > | getPlayers () |
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< AutoRefGoal > | getTeamGoals () |
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. | |
Represents a collection of players in a match.
boolean org.mctourney.autoreferee.AutoRefTeam.canEnter | ( | Location | loc) |
Checks if players on this team can be in a given location, including sneak distance.
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.
distance | maximum distance a player may move from this location |
double org.mctourney.autoreferee.AutoRefTeam.distanceToClosestRegion | ( | Location | loc) |
Returns distance from location to this team's closest region.
Set<String> org.mctourney.autoreferee.AutoRefTeam.getExpectedPlayers | ( | ) |
Gets the players expected to join this team.
AutoRefMatch org.mctourney.autoreferee.AutoRefTeam.getMatch | ( | ) |
Gets this team's match.
Set<BlockData> org.mctourney.autoreferee.AutoRefTeam.getObjectives | ( | ) |
Gets a list of team objectives for this match.
AutoRefPlayer org.mctourney.autoreferee.AutoRefTeam.getPlayer | ( | String | name) |
Gets a player from this team by name.
AutoRefPlayer org.mctourney.autoreferee.AutoRefTeam.getPlayer | ( | Player | player) |
Gets a player from this team associated with the specified player.
Set<AutoRefPlayer> org.mctourney.autoreferee.AutoRefTeam.getPlayers | ( | ) |
Gets the members of this team.
Set<AutoRefRegion> org.mctourney.autoreferee.AutoRefTeam.getRegions | ( | ) |
Gets all regions owned by this team.
Set<AutoRefGoal> org.mctourney.autoreferee.AutoRefTeam.getTeamGoals | ( | ) |
Get this team's 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.
boolean org.mctourney.autoreferee.AutoRefTeam.hasFlag | ( | Block | b, |
AutoRefRegion.Flag | flag, | ||
boolean | def | ||
) |
Checks if a region is marked with a specific region flag.
boolean org.mctourney.autoreferee.AutoRefTeam.hasFlag | ( | Location | loc, |
AutoRefRegion.Flag | flag | ||
) |
Checks if a region is marked with a specific region flag.
boolean org.mctourney.autoreferee.AutoRefTeam.hasFlag | ( | Location | loc, |
AutoRefRegion.Flag | flag, | ||
boolean | def | ||
) |
Checks if a region is marked with a specific region flag.
boolean org.mctourney.autoreferee.AutoRefTeam.isEmptyTeam | ( | ) |
Checks whether this team is empty.
Takes expected players into account.
boolean org.mctourney.autoreferee.AutoRefTeam.isReady | ( | ) |
Checks if this team is ready for the match to begin.
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.
boolean org.mctourney.autoreferee.AutoRefTeam.join | ( | Player | player, |
PlayerTeamJoinEvent.Reason | reason, | ||
boolean | force | ||
) |
Adds a player to this team.
force | force join operation, even if match is in progress |
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.
boolean org.mctourney.autoreferee.AutoRefTeam.leave | ( | Player | player, |
boolean | force | ||
) |
Removes a player from this team.
force | force leave operation, even if match is in progress |
boolean org.mctourney.autoreferee.AutoRefTeam.leaveQuietly | ( | Player | player) |
Removes a player from this team quietly.
void org.mctourney.autoreferee.AutoRefTeam.setName | ( | String | name) |
Sets the name of the team.
name | new team name |