mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-04-25 16:09:44 +00:00
Allow color-only nickname changes.
This commit is contained in:
parent
2d3691107d
commit
87842a36ba
2 changed files with 3 additions and 0 deletions
|
@ -79,6 +79,8 @@ public class Commandnick extends EssentialsLoopCommand {
|
||||||
throw new Exception(tl("nickTooLong"));
|
throw new Exception(tl("nickTooLong"));
|
||||||
} else if (FormatUtil.stripFormat(newNick).length() < 1) {
|
} else if (FormatUtil.stripFormat(newNick).length() < 1) {
|
||||||
throw new Exception(tl("nickNamesAlpha"));
|
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())) {
|
||||||
|
throw new Exception(tl("nickNamesOnlyColorChanges"));
|
||||||
}
|
}
|
||||||
return newNick;
|
return newNick;
|
||||||
}
|
}
|
||||||
|
|
|
@ -261,6 +261,7 @@ nickChanged=\u00a76Nickname changed.
|
||||||
nickDisplayName=\u00a74You have to enable change-displayname in Essentials config.
|
nickDisplayName=\u00a74You have to enable change-displayname in Essentials config.
|
||||||
nickInUse=\u00a74That name is already in use.
|
nickInUse=\u00a74That name is already in use.
|
||||||
nickNamesAlpha=\u00a74Nicknames must be alphanumeric.
|
nickNamesAlpha=\u00a74Nicknames must be alphanumeric.
|
||||||
|
nickNamesOnlyColorChanges=\u00a74Nicknames can only have their colors changed.
|
||||||
nickNoMore=\u00a76You no longer have a nickname.
|
nickNoMore=\u00a76You no longer have a nickname.
|
||||||
nickSet=\u00a76Your nickname is now \u00a7c{0}\u00a76.
|
nickSet=\u00a76Your nickname is now \u00a7c{0}\u00a76.
|
||||||
nickTooLong=\u00a74That nickname is too long.
|
nickTooLong=\u00a74That nickname is too long.
|
||||||
|
|
Loading…
Reference in a new issue