Even more TL. Fixes command description issues.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user