AutoReferee
2.5
|
Represents a player participating in a match. More...
Inherits org.mctourney.autoreferee.util.Metadatable, and Comparable< AutoRefPlayer >.
Inherited by org.mctourney.autoreferee.AutoRefSpectator.
Public Member Functions | |
AutoRefPlayer (String name, AutoRefTeam team) | |
Creates a player object for the given player name. More... | |
AutoRefPlayer (Player player, AutoRefTeam team) | |
Creates a player object for the given player. More... | |
AutoRefPlayer (Player player) | |
Creates a player object for the given player. More... | |
void | addPoints (AchievementPoints ach, int count) |
Adds achievement points for this player. | |
void | addPoints (AchievementPoints ach) |
Adds achievement points for this player. | |
void | addPoints (int points) |
Adds achievement points for this player. More... | |
void | clearInventory () |
Clears the contents of this player's inventory. | |
long | damageCooldownLength () |
Gets the number of world ticks since this player was last damaged. More... | |
void | die (EntityDamageEvent cause, boolean cleardrops) |
Kills the player. More... | |
String | getAccuracy () |
Gets a string representation of this player's accuracy. | |
Location | getBedLocation () |
Gets location of this player's bed. | |
String | getCape () |
Gets the URL for this player's cape. More... | |
Set< BlockData > | getCarrying () |
Gets the objectives carried by this player. More... | |
int | getDeaths (AutoRefPlayer apl) |
Gets the number of times this player has been killed by a specific player. More... | |
int | getDeaths () |
Gets the number of times this player has died. More... | |
String | getDisplayName () |
Gets name of this player, colored with team colors. More... | |
int | getDisplayPoints () |
Gets the normalized number of achievement points this player has earned. More... | |
Location | getExitLocation () |
Gets the location where this player left their lane. More... | |
String | getExtendedAccuracyInfo () |
Gets a string representation of this player's accuracy. More... | |
double | getFurthestShot () |
Gets the furthest bow shot. More... | |
Inventory | getInventoryView () |
Gets a copy of this player's current inventory. More... | |
Inventory | getInventoryView (String name) |
Gets a copy of this player's current inventory. More... | |
int | getKDD () |
Gets the kill-death difference. More... | |
Set< AutoRefPlayer > | getKillAssists () |
Gets the players responsible for killing this player. More... | |
AutoRefPlayer | getKiller () |
Gets the player responsible for killing this player. More... | |
int | getKills (AutoRefPlayer apl) |
Gets the number of times this player has killed a specific player. More... | |
int | getKills () |
Gets the total number of players killed by this player. More... | |
Location | getLastDeathLocation () |
Gets location of this player's most recent death. | |
Inventory | getLastInventoryView () |
Gets the last saved copy of this player's inventory. More... | |
Location | getLastLogoutLocation () |
Gets location of this player's most recent logout. | |
Location | getLastTeleportLocation () |
Gets location of this player's most recent teleport. | |
Location | getLocation () |
Gets this player's current location. More... | |
AutoRefMatch | getMatch () |
Gets the match this player is in. More... | |
String | getName () |
Gets raw player name. More... | |
Player | getPlayer () |
Retrieves a Player object corresponding to this player. More... | |
int | getPoints () |
Gets the number of achievement points this player has earned. More... | |
int | getShotsFired () |
Gets the number of arrows fired by this player. More... | |
int | getShotsHit () |
Gets the number of arrows this player's arrows that hit a target. More... | |
Location | getSpawnLocation () |
Gets the spawn location for this player. More... | |
int | getStreak (AutoRefPlayer apl) |
Gets the number of times this player has consecutively killed another. More... | |
int | getStreak () |
Gets the number of times this player has died in this life. More... | |
AutoRefTeam | getTeam () |
Gets the team this player is on. More... | |
boolean | hasBed () |
Gets whether or not the player has a bed spawn set. | |
boolean | hasClientMod () |
Returns whether or not the player has the AutoReferee client mod installed. More... | |
boolean | hasLives () |
Checks if this player has lives remaining. More... | |
void | heal () |
Heals this player, including health, hunger, saturation, and exhaustion. | |
void | incrementShotsFired () |
Increments the recorded number of arrows fired. | |
void | incrementShotsHit () |
Increments the recorded number of this player's arrows that hit a target. | |
boolean | isDead () |
Checks if the player is dead. More... | |
boolean | isDominating (AutoRefPlayer apl) |
Checks if this player is dominating a specified player. More... | |
boolean | isOnline () |
Checks if the player is online. More... | |
boolean | isPresent () |
Checks if this player is in the correct world. More... | |
void | resetArrowFire () |
Resets arrow fire statistics. | |
void | resetKillStreak () |
Resets this player's killstreak. | |
void | setCape (String url) |
Sets the URL for this player's cape. More... | |
void | setFurthestShot (double distance) |
Sets the furthest accurate bow shot. | |
void | setLivesRemaining (int lives) |
Sets the number of lives remaining for this player. More... | |
void | setName (String name) |
Sets raw player name. | |
void | setSpawnLocation (Location spawn) |
Sets custom spawn location. | |
void | setTeam (AutoRefTeam team) |
Sets the team this player is on. | |
boolean | showInventory (Player player, boolean old) |
Shows this player's inventory to the specified player. More... | |
boolean | showInventory (Player player) |
Shows this player's inventory to the specified player. More... | |
boolean | showSavedInventory (Player player) |
Shows this player's last saved inventory to the specified player. More... | |
boolean | wasDamagedRecently () |
Checks if the player has been damaged recently. More... | |
Represents a player participating in a match.
org.mctourney.autoreferee.AutoRefPlayer.AutoRefPlayer | ( | String | name, |
AutoRefTeam | team | ||
) |
Creates a player object for the given player name.
name | player name |
team | player team, or null if no team |
org.mctourney.autoreferee.AutoRefPlayer.AutoRefPlayer | ( | Player | player, |
AutoRefTeam | team | ||
) |
Creates a player object for the given player.
player | player |
team | player team, or null if no team |
org.mctourney.autoreferee.AutoRefPlayer.AutoRefPlayer | ( | Player | player) |
Creates a player object for the given player.
player | player |
void org.mctourney.autoreferee.AutoRefPlayer.addPoints | ( | int | points) |
Adds achievement points for this player.
This method can be used to add custom point values, if necessary.
long org.mctourney.autoreferee.AutoRefPlayer.damageCooldownLength | ( | ) |
Gets the number of world ticks since this player was last damaged.
void org.mctourney.autoreferee.AutoRefPlayer.die | ( | EntityDamageEvent | cause, |
boolean | cleardrops | ||
) |
Kills the player.
If the match has not yet started, the player will be teleported back to spawn.
cause | reported cause of death, or null if no cause |
cleardrops | clear contents of inventory on death |
String org.mctourney.autoreferee.AutoRefPlayer.getCape | ( | ) |
Gets the URL for this player's cape.
Set<BlockData> org.mctourney.autoreferee.AutoRefPlayer.getCarrying | ( | ) |
Gets the objectives carried by this player.
int org.mctourney.autoreferee.AutoRefPlayer.getDeaths | ( | AutoRefPlayer | apl) |
Gets the number of times this player has been killed by a specific player.
apl | target player |
int org.mctourney.autoreferee.AutoRefPlayer.getDeaths | ( | ) |
Gets the number of times this player has died.
String org.mctourney.autoreferee.AutoRefPlayer.getDisplayName | ( | ) |
Gets name of this player, colored with team colors.
int org.mctourney.autoreferee.AutoRefPlayer.getDisplayPoints | ( | ) |
Gets the normalized number of achievement points this player has earned.
Location org.mctourney.autoreferee.AutoRefPlayer.getExitLocation | ( | ) |
Gets the location where this player left their lane.
String org.mctourney.autoreferee.AutoRefPlayer.getExtendedAccuracyInfo | ( | ) |
Gets a string representation of this player's accuracy.
Includes number of shots fired and the number of hits.
double org.mctourney.autoreferee.AutoRefPlayer.getFurthestShot | ( | ) |
Gets the furthest bow shot.
Inventory org.mctourney.autoreferee.AutoRefPlayer.getInventoryView | ( | ) |
Gets a copy of this player's current inventory.
This includes an extra row for armor and health/hunger information.
Inventory org.mctourney.autoreferee.AutoRefPlayer.getInventoryView | ( | String | name) |
Gets a copy of this player's current inventory.
This includes an extra row for armor and health/hunger information.
int org.mctourney.autoreferee.AutoRefPlayer.getKDD | ( | ) |
Gets the kill-death difference.
Set<AutoRefPlayer> org.mctourney.autoreferee.AutoRefPlayer.getKillAssists | ( | ) |
Gets the players responsible for killing this player.
AutoRefPlayer org.mctourney.autoreferee.AutoRefPlayer.getKiller | ( | ) |
Gets the player responsible for killing this player.
int org.mctourney.autoreferee.AutoRefPlayer.getKills | ( | AutoRefPlayer | apl) |
Gets the number of times this player has killed a specific player.
apl | target player |
int org.mctourney.autoreferee.AutoRefPlayer.getKills | ( | ) |
Gets the total number of players killed by this player.
Inventory org.mctourney.autoreferee.AutoRefPlayer.getLastInventoryView | ( | ) |
Gets the last saved copy of this player's inventory.
If the inventory view is older than a certain age, this method returns null
Location org.mctourney.autoreferee.AutoRefPlayer.getLocation | ( | ) |
Gets this player's current location.
AutoRefMatch org.mctourney.autoreferee.AutoRefPlayer.getMatch | ( | ) |
Gets the match this player is in.
String org.mctourney.autoreferee.AutoRefPlayer.getName | ( | ) |
Gets raw player name.
Player org.mctourney.autoreferee.AutoRefPlayer.getPlayer | ( | ) |
Retrieves a Player object corresponding to this player.
Player objects are not cached, since they can log out and log in, so this method will always require a lookup.
int org.mctourney.autoreferee.AutoRefPlayer.getPoints | ( | ) |
Gets the number of achievement points this player has earned.
int org.mctourney.autoreferee.AutoRefPlayer.getShotsFired | ( | ) |
Gets the number of arrows fired by this player.
int org.mctourney.autoreferee.AutoRefPlayer.getShotsHit | ( | ) |
Gets the number of arrows this player's arrows that hit a target.
Location org.mctourney.autoreferee.AutoRefPlayer.getSpawnLocation | ( | ) |
Gets the spawn location for this player.
int org.mctourney.autoreferee.AutoRefPlayer.getStreak | ( | AutoRefPlayer | apl) |
Gets the number of times this player has consecutively killed another.
This value will reset itself to zero once this player is killed by the target player.
apl | target player |
int org.mctourney.autoreferee.AutoRefPlayer.getStreak | ( | ) |
Gets the number of times this player has died in this life.
AutoRefTeam org.mctourney.autoreferee.AutoRefPlayer.getTeam | ( | ) |
Gets the team this player is on.
boolean org.mctourney.autoreferee.AutoRefPlayer.hasClientMod | ( | ) |
Returns whether or not the player has the AutoReferee client mod installed.
boolean org.mctourney.autoreferee.AutoRefPlayer.hasLives | ( | ) |
Checks if this player has lives remaining.
boolean org.mctourney.autoreferee.AutoRefPlayer.isDead | ( | ) |
Checks if the player is dead.
boolean org.mctourney.autoreferee.AutoRefPlayer.isDominating | ( | AutoRefPlayer | apl) |
Checks if this player is dominating a specified player.
boolean org.mctourney.autoreferee.AutoRefPlayer.isOnline | ( | ) |
Checks if the player is online.
boolean org.mctourney.autoreferee.AutoRefPlayer.isPresent | ( | ) |
Checks if this player is in the correct world.
void org.mctourney.autoreferee.AutoRefPlayer.setCape | ( | String | url) |
Sets the URL for this player's cape.
This cape can be shown by a modified client only, as Minecraft does not permit custom capes.
url | URL of a 64x32 image for the player's cape |
void org.mctourney.autoreferee.AutoRefPlayer.setLivesRemaining | ( | int | lives) |
Sets the number of lives remaining for this player.
lives | number of lives remaining before player is eliminated |
boolean org.mctourney.autoreferee.AutoRefPlayer.showInventory | ( | Player | player, |
boolean | old | ||
) |
Shows this player's inventory to the specified player.
boolean org.mctourney.autoreferee.AutoRefPlayer.showInventory | ( | Player | player) |
Shows this player's inventory to the specified player.
boolean org.mctourney.autoreferee.AutoRefPlayer.showSavedInventory | ( | Player | player) |
Shows this player's last saved inventory to the specified player.
boolean org.mctourney.autoreferee.AutoRefPlayer.wasDamagedRecently | ( | ) |
Checks if the player has been damaged recently.