2011-02-06 13:36:11 +01:00
|
|
|
package com.bukkit.mcteam.factions.struct;
|
|
|
|
|
2011-02-12 18:05:05 +01:00
|
|
|
import com.bukkit.mcteam.factions.entities.Conf;
|
|
|
|
|
2011-02-06 13:36:11 +01:00
|
|
|
public enum Role {
|
|
|
|
ADMIN(2, "admin"),
|
|
|
|
MODERATOR(1, "moderator"),
|
2011-03-11 05:14:39 +01:00
|
|
|
NORMAL(0, "normal member");
|
2011-02-06 13:36:11 +01:00
|
|
|
|
|
|
|
public final int value;
|
|
|
|
public final String nicename;
|
|
|
|
|
|
|
|
private Role(final int value, final String nicename) {
|
|
|
|
this.value = value;
|
|
|
|
this.nicename = nicename;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String toString() {
|
|
|
|
return this.nicename;
|
|
|
|
}
|
2011-02-12 18:05:05 +01:00
|
|
|
|
|
|
|
public String getPrefix() {
|
|
|
|
if (this == Role.ADMIN) {
|
|
|
|
return Conf.prefixAdmin;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (this == Role.MODERATOR) {
|
|
|
|
return Conf.prefixMod;
|
|
|
|
}
|
|
|
|
|
|
|
|
return "";
|
|
|
|
}
|
2011-02-06 13:36:11 +01:00
|
|
|
}
|