GamePlayerpublic class CoreGamePlayer extends java.lang.Object implements GamePlayer
| Constructor | Description |
|---|---|
CoreGamePlayer(org.bukkit.entity.Player player,
Game game) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
clearInventory() |
Clears the player's inventory, including their armor.
|
Arena |
getArena() |
Gets the Arena object for the arena the player is in.
|
org.bukkit.entity.Player |
getBukkitPlayer() |
Gets the Bukkit player object for the player.
|
GameClass |
getGameClass() |
Gets the active game class for the player.
|
Team |
getTeam() |
Gets the player's team.
|
boolean |
hasClass(GameClass gameClass) |
Checks if the player has permission to use a game class.
|
void |
heal() |
Heals the player and removes any status effects.
|
void |
initializeClass() |
Gives the player the items provided by their active class.
|
boolean |
isInGame() |
Gets the in-game status of the player.
|
boolean |
isPlaying() |
Gets the playing status of the player.
|
boolean |
isSpectating() |
Gets the spectating status of the player.
|
void |
resetTeam() |
Resets the team the player is on to a null state.
|
void |
restoreInventory() |
Restores the player's inventory to its last stored state.
|
void |
saveInventory() |
Stores the player's inventory in its current state.
|
void |
sendMessage(java.lang.String message) |
Sends the player a message with the game's prefix.
|
void |
setArena(Arena arena) |
Sets the players arena to a specific Arena object.
|
void |
setClass(GameClass gameClass) |
Sets the active game class for the player.
|
void |
setFlying(boolean flying) |
Sets if the player is flying.
|
void |
setTeam(Team team) |
Sets the player's team.
|
void |
teleport(org.bukkit.Location location) |
Teleports the player to a location.
|
public CoreGamePlayer(org.bukkit.entity.Player player,
Game game)
public void setArena(Arena arena)
GamePlayersetArena in interface GamePlayerarena - the arena the player is inpublic Arena getArena()
GamePlayergetArena in interface GamePlayerpublic boolean isInGame()
GamePlayerisInGame in interface GamePlayerpublic boolean isPlaying()
GamePlayerisPlaying in interface GamePlayerpublic boolean isSpectating()
GamePlayerisSpectating in interface GamePlayerpublic org.bukkit.entity.Player getBukkitPlayer()
GamePlayergetBukkitPlayer in interface GamePlayerpublic void setClass(GameClass gameClass)
GamePlayersetClass in interface GamePlayergameClass - the game class to set as activepublic GameClass getGameClass()
GamePlayergetGameClass in interface GamePlayerpublic void initializeClass()
GamePlayerinitializeClass in interface GamePlayerpublic void saveInventory()
GamePlayersaveInventory in interface GamePlayerpublic void restoreInventory()
GamePlayerrestoreInventory in interface GamePlayerpublic boolean hasClass(GameClass gameClass)
GamePlayerhasClass in interface GamePlayergameClass - the class to check permission forpublic void sendMessage(java.lang.String message)
GamePlayersendMessage in interface GamePlayermessage - the content of the messagepublic Team getTeam()
GamePlayergetTeam in interface GamePlayerpublic void setTeam(Team team)
GamePlayersetTeam in interface GamePlayerteam - the team to set the player onpublic void resetTeam()
GamePlayerresetTeam in interface GamePlayerpublic void teleport(org.bukkit.Location location)
GamePlayerteleport in interface GamePlayerlocation - the location to teleport the player topublic void heal()
GamePlayerheal in interface GamePlayerpublic void clearInventory()
GamePlayerclearInventory in interface GamePlayerpublic void setFlying(boolean flying)
GamePlayersetFlying in interface GamePlayerflying - whether or not the player is flying