Package com.minigameworld.frames.helpers
Class MiniGamePlayer
java.lang.Object
com.minigameworld.frames.helpers.MiniGamePlayer
- All Implemented Interfaces:
 MiniGameRank,Cloneable,Comparable<MiniGameRank>
Player data with score, live
[IMPORTANT] live is only valid in the minigame play (not related with player's health)
[IMPORTANT] Player state will be saved when a instance is created (in constructor)
[IMPORTANT] live is only valid in the minigame play (not related with player's health)
[IMPORTANT] Player state will be saved when a instance is created (in constructor)
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionclone()org.bukkit.entity.PlayerGets a playerList<org.bukkit.entity.Player>Gets rank playersintgetScore()Gets player's scoregetState()Gets player state instancebooleanisLive()Check player is live in the minigame playbooleanisSamePlayer(org.bukkit.entity.Player other)Check player are the samevoidminusScore(int amount)Minus player's scorevoidplusScore(int amount)Plus player's scorevoidsetLive(boolean live)Sets player's live in the minigame player
This method will checkMiniGame.checkGameFinishCondition()Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.minigameworld.frames.helpers.MiniGameRank
compareTo 
- 
Constructor Details
- 
MiniGamePlayer
 
 - 
 - 
Method Details
- 
getPlayer
public org.bukkit.entity.Player getPlayer()Gets a player- Returns:
 - Player
 
 - 
isSamePlayer
public boolean isSamePlayer(org.bukkit.entity.Player other)Check player are the same- Parameters:
 other- Other player- Returns:
 - True if the same player
 
 - 
getScore
public int getScore()Gets player's score- Specified by:
 getScorein interfaceMiniGameRank- Returns:
 
 - 
plusScore
public void plusScore(int amount)Plus player's score- Parameters:
 amount- Score amount
 - 
minusScore
public void minusScore(int amount)Minus player's score- Parameters:
 amount- Score amount
 - 
isLive
public boolean isLive()Check player is live in the minigame play- Returns:
 - True if alive
 
 - 
setLive
public void setLive(boolean live)Sets player's live in the minigame player
This method will checkMiniGame.checkGameFinishCondition()- Parameters:
 live- False if make death a player
 - 
getState
Gets player state instance- Returns:
 - MiniGamePlayerState
 
 - 
getPlayers
Description copied from interface:MiniGameRankGets rank players- Specified by:
 getPlayersin interfaceMiniGameRank- Returns:
 - Players
 
 - 
clone
 
 -