mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-27 01:40:48 +08:00
Added permission node for Nickname Prefix bypass (#4995)
Allow a permission to determine whether the nickname prefix gets applied to a group or user. It also removes a statement that is not true in the essentials config, the nickname prefix is NOT included in the nickname max length. Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com> Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
This commit is contained in:
parent
879e70fb6b
commit
20011b9996
@ -463,8 +463,12 @@ public class User extends UserData implements Comparable<User>, IMessageRecipien
|
||||
nickname = getName();
|
||||
} else if (nick.equalsIgnoreCase(getName())) {
|
||||
nickname = nick;
|
||||
} else {
|
||||
if (isAuthorized("essentials.nick.hideprefix")) {
|
||||
nickname = nick;
|
||||
} else {
|
||||
nickname = FormatUtil.replaceFormat(ess.getSettings().getNicknamePrefix()) + nick;
|
||||
}
|
||||
suffix = "§r";
|
||||
}
|
||||
|
||||
|
@ -27,9 +27,10 @@
|
||||
ops-name-color: '4'
|
||||
|
||||
# The character(s) to prefix all nicknames, so that you know they are not true usernames.
|
||||
# Users with essentials.nick.hideprefix will not be prefixed with the character(s)
|
||||
nickname-prefix: '~'
|
||||
|
||||
# The maximum length allowed in nicknames. The nickname prefix is included in this.
|
||||
# The maximum length allowed in nicknames. The nickname prefix is not included in this.
|
||||
max-nick-length: 15
|
||||
|
||||
# A list of phrases that cannot be used in nicknames. You can include regular expressions here.
|
||||
|
@ -709,3 +709,6 @@ permissions:
|
||||
essentials.sudo.exempt: true
|
||||
essentials.tempban.exempt: true
|
||||
essentials.exempt.protect: true
|
||||
essentials.nick.hideprefix:
|
||||
default: false
|
||||
description: Players with this permission will not have the nickname prefix applied to them
|
||||
|
Loading…
Reference in New Issue
Block a user