Package fr.royalpha.sheepwars.api
Enum PlayerData.DataType
- java.lang.Object
-
- java.lang.Enum<PlayerData.DataType>
-
- fr.royalpha.sheepwars.api.PlayerData.DataType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<PlayerData.DataType>
,java.lang.constant.Constable
- Enclosing class:
- PlayerData
public static enum PlayerData.DataType extends java.lang.Enum<PlayerData.DataType>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description GAMES_PLAYED
GAMES_WON
PLAYERS_KILLED
SHEEP_KILLED
SHEEP_THROWN
TOTAL_DEATHS
TOTAL_TIME
-
Field Summary
Fields Modifier and Type Field Description private int
id
private fr.royalpha.sheepwars.core.message.Message
message
private java.util.LinkedHashMap<java.lang.String,java.lang.Integer>
playerTop
private java.lang.String
tableColumn
-
Constructor Summary
Constructors Modifier Constructor Description private
DataType(int id, fr.royalpha.sheepwars.core.message.Message.Messages msgEnum, java.lang.String tableColumn)
-
Method Summary
Modifier and Type Method Description int
after()
int
before()
void
generateRanking()
static PlayerData.DataType
getFromId(int id)
fr.royalpha.sheepwars.core.message.Message
getMessage()
java.util.Map<java.lang.String,java.lang.Integer>
getRanking(int limit)
int
getTopSize()
static PlayerData.DataType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static PlayerData.DataType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
GAMES_PLAYED
public static final PlayerData.DataType GAMES_PLAYED
-
TOTAL_DEATHS
public static final PlayerData.DataType TOTAL_DEATHS
-
PLAYERS_KILLED
public static final PlayerData.DataType PLAYERS_KILLED
-
SHEEP_THROWN
public static final PlayerData.DataType SHEEP_THROWN
-
SHEEP_KILLED
public static final PlayerData.DataType SHEEP_KILLED
-
TOTAL_TIME
public static final PlayerData.DataType TOTAL_TIME
-
GAMES_WON
public static final PlayerData.DataType GAMES_WON
-
-
Method Detail
-
values
public static PlayerData.DataType[] values()
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PlayerData.DataType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getMessage
public fr.royalpha.sheepwars.core.message.Message getMessage()
-
getTopSize
public int getTopSize()
-
after
public int after()
-
before
public int before()
-
generateRanking
public void generateRanking()
-
getRanking
public java.util.Map<java.lang.String,java.lang.Integer> getRanking(int limit)
-
getFromId
public static PlayerData.DataType getFromId(int id)
-
-