mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-17 16:15:21 +01:00
Remove colour in permission checks.
As @supaham pointed out, this can cause issues with giving a player a wildcard permission and then negating the specific node if both nodes aren't negated.
This commit is contained in:
parent
87842a36ba
commit
a669163196
@ -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") || user.isAuthorized("essentials.nick.changecolours")) && !FormatUtil.stripFormat(newNick).equals(user.getName())) {
|
||||
} else if (user != null && (user.isAuthorized("essentials.nick.changecolors")) && !FormatUtil.stripFormat(newNick).equals(user.getName())) {
|
||||
throw new Exception(tl("nickNamesOnlyColorChanges"));
|
||||
}
|
||||
return newNick;
|
||||
|
@ -68,7 +68,7 @@ public class FormatUtil {
|
||||
return null;
|
||||
}
|
||||
String message;
|
||||
if (user.isAuthorized(permBase + ".color") || user.isAuthorized(permBase + ".colour")) {
|
||||
if (user.isAuthorized(permBase + ".color")) {
|
||||
message = replaceColor(input, REPLACE_COLOR_PATTERN);
|
||||
} else {
|
||||
message = stripColor(input, VANILLA_COLOR_PATTERN);
|
||||
|
Loading…
Reference in New Issue
Block a user