Add bypass permission to nick command

This should allow users of wildcard permissions to be able to change their nicks as intended, without any changes to their current setup.
This commit is contained in:
AdamQpzm 2016-01-04 21:32:19 +00:00
parent a669163196
commit 9f75f1aad3

View file

@ -79,7 +79,7 @@ public class Commandnick extends EssentialsLoopCommand {
throw new Exception(tl("nickTooLong"));
} else if (FormatUtil.stripFormat(newNick).length() < 1) {
throw new Exception(tl("nickNamesAlpha"));
} else if (user != null && (user.isAuthorized("essentials.nick.changecolors")) && !FormatUtil.stripFormat(newNick).equals(user.getName())) {
} else if (user != null && (user.isAuthorized("essentials.nick.changecolors") && !user.isAuthorized("essentials.nick.changecolors.bypass")) && !FormatUtil.stripFormat(newNick).equals(user.getName())) {
throw new Exception(tl("nickNamesOnlyColorChanges"));
}
return newNick;