Skip to content

Commit

Permalink
Fix nickname feedback message when change-displayname is off (#4980)
Browse files Browse the repository at this point in the history
Make the feedback message use the nickname instead of the player's display name if change-displayname is disabled. Fixes #4979.
  • Loading branch information
Warriorrrr authored Jul 11, 2022
1 parent f4b6197 commit 09dc49a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ protected void updatePlayer(final Server server, final CommandSource sender, fin
if (!target.getDisplayName().equalsIgnoreCase(target.getDisplayName())) {
target.sendMessage(tl("nickNoMore"));
}
target.sendMessage(tl("nickSet", target.getDisplayName()));
target.sendMessage(tl("nickSet", ess.getSettings().changeDisplayName() ? target.getDisplayName() : nick));
} else if (nickInUse(target, nick)) {
throw new NotEnoughArgumentsException(tl("nickInUse"));
} else {
setNickname(server, sender, target, nick);
target.sendMessage(tl("nickSet", target.getDisplayName()));
target.sendMessage(tl("nickSet", ess.getSettings().changeDisplayName() ? target.getDisplayName() : nick));
}
}

Expand Down

0 comments on commit 09dc49a

Please sign in to comment.