Major f perm fix; Fix sethome permission check (#1079)

This commit is contained in:
Dariasc
2018-03-09 15:22:15 -03:00
committed by Trent Hensler
parent 693c831327
commit 819cb542cd
6 changed files with 28 additions and 32 deletions

View File

@@ -108,16 +108,13 @@ public class CmdPerm extends FCommand {
}
private Permissable getPermissable(String name) {
try {
return Relation.valueOf(name.toUpperCase());
} catch (Exception e) {
if (Role.fromString(name.toUpperCase()) != null) {
return Role.fromString(name.toUpperCase());
} else if (Relation.fromString(name.toUpperCase()) != null) {
return Relation.fromString(name.toUpperCase());
} else {
return null;
}
try {
return Role.valueOf(name.toUpperCase());
} catch (Exception e) {
}
return null;
}
@Override