Even more TL. Fixes command description issues.

This commit is contained in:
korikisulda
2015-01-21 23:58:33 +00:00
committed by eueln
parent 1cc544db64
commit 7e6aa4fc25
67 changed files with 468 additions and 126 deletions

View File

@@ -1,18 +1,21 @@
package com.massivecraft.factions.struct;
import com.massivecraft.factions.Conf;
import com.massivecraft.factions.zcore.util.TL;
public enum Role {
ADMIN(2, "admin"),
MODERATOR(1, "moderator"),
NORMAL(0, "normal member");
ADMIN(2, TL.ROLE_ADMIN),
MODERATOR(1, TL.ROLE_MODERATOR),
NORMAL(0, TL.ROLE_NORMAL);
public final int value;
public final String nicename;
public final TL translation;
private Role(final int value, final String nicename) {
private Role(final int value, final TL translation) {
this.value = value;
this.nicename = nicename;
this.nicename = translation.toString();
this.translation = translation;
}
public boolean isAtLeast(Role role) {
@@ -28,6 +31,10 @@ public enum Role {
return this.nicename;
}
public TL getTranslation(){
return translation;
}
public String getPrefix() {
if (this == Role.ADMIN) {
return Conf.prefixAdmin;