Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ protected void handlePrivateMessage(@NotNull CommandSender sender, @NotNull Comm
if (!(recipient instanceof Player)) {
recipientFormat = TextUtil.stripHex(recipientFormat);
recipient.sendMessage(recipientFormat);
return;
} else {
FormattedMessage formattedMessage = new FormattedMessage(recipientFormat);
formattedMessage.toFancyMessage().send(recipient, sender instanceof Player ? ((Player) sender) : null);
recipient.sendMessage(recipientFormat);

String soundName = configuration.getNode("pm.sound").getAsString(null);
if (soundName != null) {
Expand All @@ -138,7 +138,9 @@ protected void handlePrivateMessage(@NotNull CommandSender sender, @NotNull Comm
senderName, senderPrefix, senderSuffix);

if (!(sender instanceof Player)) {
TextUtil.stripHex(senderFormat);
senderFormat = TextUtil.stripHex(senderFormat);
sender.sendMessage(senderFormat);
return;
}

sender.sendMessage(senderFormat);
Expand Down