mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-04 07:28:04 +01:00
Force displayname update on /list.
Tidy duplicate displayname call.
This commit is contained in:
parent
fd2ec22919
commit
05242a7e8f
@ -47,7 +47,6 @@ public class EssentialsPlayerListener extends PlayerListener
|
|||||||
public void onPlayerRespawn(final PlayerRespawnEvent event)
|
public void onPlayerRespawn(final PlayerRespawnEvent event)
|
||||||
{
|
{
|
||||||
final User user = ess.getUser(event.getPlayer());
|
final User user = ess.getUser(event.getPlayer());
|
||||||
user.setDisplayNick(user.getNick());
|
|
||||||
updateCompass(user);
|
updateCompass(user);
|
||||||
if (ess.getSettings().changeDisplayName())
|
if (ess.getSettings().changeDisplayName())
|
||||||
{
|
{
|
||||||
|
@ -258,7 +258,6 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
|
|||||||
|
|
||||||
if (ess.getSettings().addPrefixSuffix())
|
if (ess.getSettings().addPrefixSuffix())
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!ess.getSettings().disablePrefix())
|
if (!ess.getSettings().disablePrefix())
|
||||||
{
|
{
|
||||||
final String prefix = ess.getPermissionsHandler().getPrefix(base).replace('&', '§').replace("{WORLDNAME}", this.getWorld().getName());
|
final String prefix = ess.getPermissionsHandler().getPrefix(base).replace('&', '§').replace("{WORLDNAME}", this.getWorld().getName());
|
||||||
@ -291,6 +290,10 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
|
|||||||
@Override
|
@Override
|
||||||
public String getDisplayName()
|
public String getDisplayName()
|
||||||
{
|
{
|
||||||
|
if (ess.getSettings().changeDisplayName())
|
||||||
|
{
|
||||||
|
setDisplayNick(getNick());
|
||||||
|
}
|
||||||
return super.getDisplayName() == null ? super.getName() : super.getDisplayName();
|
return super.getDisplayName() == null ? super.getName() : super.getDisplayName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user