Add command to set default rank. Only used by admins.

/f defaultrole <role>
This commit is contained in:
Trent Hensler
2018-01-04 17:37:21 -08:00
parent 4db185e3ee
commit f6bd156f89
7 changed files with 88 additions and 1 deletions

View File

@@ -21,6 +21,7 @@ public enum Permission {
CLAIM_RADIUS("claim.radius"),
CONFIG("config"),
CREATE("create"),
DEFAULTRANK("defaultrank"),
DEINVITE("deinvite"),
DESCRIPTION("description"),
DISBAND("disband"),

View File

@@ -45,6 +45,24 @@ public enum Role {
return null;
}
public static Role fromString(String check) {
switch (check.toLowerCase()) {
case "admin":
return ADMIN;
case "mod":
case "moderator":
return MODERATOR;
case "normal":
case "member":
return NORMAL;
case "recruit":
case "rec":
return RECRUIT;
}
return null;
}
@Override
public String toString() {
return this.nicename;