GamePlayer
public 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)
GamePlayer
setArena
in interface GamePlayer
arena
- the arena the player is inpublic Arena getArena()
GamePlayer
getArena
in interface GamePlayer
public boolean isInGame()
GamePlayer
isInGame
in interface GamePlayer
public boolean isPlaying()
GamePlayer
isPlaying
in interface GamePlayer
public boolean isSpectating()
GamePlayer
isSpectating
in interface GamePlayer
public org.bukkit.entity.Player getBukkitPlayer()
GamePlayer
getBukkitPlayer
in interface GamePlayer
public void setClass(GameClass gameClass)
GamePlayer
setClass
in interface GamePlayer
gameClass
- the game class to set as activepublic GameClass getGameClass()
GamePlayer
getGameClass
in interface GamePlayer
public void initializeClass()
GamePlayer
initializeClass
in interface GamePlayer
public void saveInventory()
GamePlayer
saveInventory
in interface GamePlayer
public void restoreInventory()
GamePlayer
restoreInventory
in interface GamePlayer
public boolean hasClass(GameClass gameClass)
GamePlayer
hasClass
in interface GamePlayer
gameClass
- the class to check permission forpublic void sendMessage(java.lang.String message)
GamePlayer
sendMessage
in interface GamePlayer
message
- the content of the messagepublic Team getTeam()
GamePlayer
getTeam
in interface GamePlayer
public void setTeam(Team team)
GamePlayer
setTeam
in interface GamePlayer
team
- the team to set the player onpublic void resetTeam()
GamePlayer
resetTeam
in interface GamePlayer
public void teleport(org.bukkit.Location location)
GamePlayer
teleport
in interface GamePlayer
location
- the location to teleport the player topublic void heal()
GamePlayer
heal
in interface GamePlayer
public void clearInventory()
GamePlayer
clearInventory
in interface GamePlayer
public void setFlying(boolean flying)
GamePlayer
setFlying
in interface GamePlayer
flying
- whether or not the player is flying