mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-17 16:15:21 +01:00
Allow color-only nickname changes.
This commit is contained in:
parent
2d3691107d
commit
87842a36ba
@ -79,6 +79,8 @@ 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())) {
|
||||
throw new Exception(tl("nickNamesOnlyColorChanges"));
|
||||
}
|
||||
return newNick;
|
||||
}
|
||||
|
@ -261,6 +261,7 @@ nickChanged=\u00a76Nickname changed.
|
||||
nickDisplayName=\u00a74You have to enable change-displayname in Essentials config.
|
||||
nickInUse=\u00a74That name is already in use.
|
||||
nickNamesAlpha=\u00a74Nicknames must be alphanumeric.
|
||||
nickNamesOnlyColorChanges=\u00a74Nicknames can only have their colors changed.
|
||||
nickNoMore=\u00a76You no longer have a nickname.
|
||||
nickSet=\u00a76Your nickname is now \u00a7c{0}\u00a76.
|
||||
nickTooLong=\u00a74That nickname is too long.
|
||||
|
Loading…
Reference in New Issue
Block a user