mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-06 20:43:11 +00:00
Hiding display names (#2248) @AllTheMegahertz
Prevents a user's nickname from appearing if they are hidden, if `hide-displayname-in-vanish: true` in the config. Closes #2221. * Does not return display name if user is hidden * Added hide-displayname-in-vanish field * Added hideDisplayNameInVanish() * Changed to only hide display name if specified in config * Changed hideDisplayNameInVanish to default to false if not specified in config.yml
This commit is contained in:
parent
6a6383462d
commit
a18ce40921
4 changed files with 12 additions and 1 deletions
|
@ -360,7 +360,7 @@ public class User extends UserData implements Comparable<User>, IMessageRecipien
|
|||
}
|
||||
|
||||
public String getDisplayName() {
|
||||
return super.getBase().getDisplayName() == null ? super.getBase().getName() : super.getBase().getDisplayName();
|
||||
return super.getBase().getDisplayName() == null || (ess.getSettings().hideDisplayNameInVanish() && isHidden()) ? super.getBase().getName() : super.getBase().getDisplayName();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue