mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-31 21:48:31 +01:00
Fix nickname feedback message when change-displayname is off (#4980)
Make the feedback message use the nickname instead of the player's display name if change-displayname is disabled. Fixes #4979.
This commit is contained in:
parent
f4b6197a49
commit
09dc49aacb
@ -53,12 +53,12 @@ public class Commandnick extends EssentialsLoopCommand {
|
|||||||
if (!target.getDisplayName().equalsIgnoreCase(target.getDisplayName())) {
|
if (!target.getDisplayName().equalsIgnoreCase(target.getDisplayName())) {
|
||||||
target.sendMessage(tl("nickNoMore"));
|
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)) {
|
} else if (nickInUse(target, nick)) {
|
||||||
throw new NotEnoughArgumentsException(tl("nickInUse"));
|
throw new NotEnoughArgumentsException(tl("nickInUse"));
|
||||||
} else {
|
} else {
|
||||||
setNickname(server, sender, target, nick);
|
setNickname(server, sender, target, nick);
|
||||||
target.sendMessage(tl("nickSet", target.getDisplayName()));
|
target.sendMessage(tl("nickSet", ess.getSettings().changeDisplayName() ? target.getDisplayName() : nick));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user