mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-11-19 01:40:00 +00: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
2 changed files with 2 additions and 2 deletions
|
@ -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 a new issue