Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix hex colors in pm message for recipient #171

Merged
merged 1 commit into from
Jun 16, 2022
Merged
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 @@ -10,7 +10,7 @@
import ru.mrbrikster.chatty.Chatty;
import ru.mrbrikster.chatty.chat.JsonStorage;
import ru.mrbrikster.chatty.dependencies.PlayerTagManager;
import ru.mrbrikster.chatty.json.fanciful.FancyMessage;
import ru.mrbrikster.chatty.json.FormattedMessage;
import ru.mrbrikster.chatty.moderation.AdvertisementModerationMethod;
import ru.mrbrikster.chatty.moderation.ModerationManager;
import ru.mrbrikster.chatty.moderation.SwearModerationMethod;
Expand Down Expand Up @@ -119,8 +119,8 @@ protected void handlePrivateMessage(@NotNull CommandSender sender, @NotNull Comm
recipientFormat = TextUtil.stripHex(recipientFormat);
recipient.sendMessage(recipientFormat);
} else {
new FancyMessage(recipientFormat)
.send(recipient, sender instanceof Player ? ((Player) sender) : null);
FormattedMessage formattedMessage = new FormattedMessage(recipientFormat);
formattedMessage.toFancyMessage().send((Player) recipient, (Player) sender);

String soundName = configuration.getNode("pm.sound").getAsString(null);
if (soundName != null) {
Expand Down