mirror of https://github.com/taoneill/war.git
34 lines
657 B
Java
34 lines
657 B
Java
package com.tommytony.war.config;
|
|
|
|
public enum ScoreboardType {
|
|
|
|
NONE(null),
|
|
POINTS("Points"),
|
|
LIFEPOOL("Lifepool"),
|
|
TOPKILLS("Top kills");
|
|
private final String displayName;
|
|
|
|
private ScoreboardType(String displayName) {
|
|
this.displayName = displayName;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return super.toString().toLowerCase();
|
|
}
|
|
|
|
public static ScoreboardType getFromString(String string) {
|
|
for (ScoreboardType boardMode : ScoreboardType.values()) {
|
|
if (string.toLowerCase().equals(boardMode.toString())) {
|
|
return boardMode;
|
|
}
|
|
}
|
|
|
|
return ScoreboardType.NONE;
|
|
}
|
|
|
|
public String getDisplayName() {
|
|
return displayName;
|
|
}
|
|
}
|