Fix sign command

This commit is contained in:
BruceChen 2022-10-14 20:34:45 +08:00
parent a7e69fd9fd
commit 01802dfcff
3 changed files with 587 additions and 61 deletions

View file

@ -47,11 +47,20 @@ namespace MinecraftClient.Protocol
/// <returns>Returns the translated text</returns>
public static string ParseSignedChat(ChatMessage message, List<string>? links = null)
{
string chatContent = (Config.Signature.ShowModifiedChat && message.unsignedContent != null) ? message.unsignedContent : message.content;
string content = ParseText(chatContent, links);
if (string.IsNullOrEmpty(content))
content = chatContent;
string sender = message.displayName!;
string content;
if (Config.Signature.ShowModifiedChat && message.unsignedContent != null)
{
content = ParseText(message.unsignedContent!);
if (string.IsNullOrEmpty(content))
content = message.unsignedContent!;
}
else
{
content = message.isJson ? ParseText(message.content) : message.content;
if (string.IsNullOrEmpty(content))
content = message.content!;
}
string text;
List<string> usingData = new();