mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Update ConsoleInteractive
This commit is contained in:
parent
0bd7ee0f8e
commit
a7e69fd9fd
3 changed files with 20 additions and 5 deletions
|
|
@ -553,6 +553,19 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
(messageTypeEnum == ChatParser.MessageType.TEAM_MSG_COMMAND_INCOMING || messageTypeEnum == ChatParser.MessageType.TEAM_MSG_COMMAND_OUTGOING))
|
||||
senderTeamName = Json.ParseJson(targetName).Properties["with"].DataArray[0].Properties["text"].StringValue;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(senderDisplayName))
|
||||
{
|
||||
PlayerInfo? player = handler.GetPlayerInfo(senderUUID);
|
||||
if (player != null && (player.DisplayName != null || player.Name != null) && string.IsNullOrWhiteSpace(senderDisplayName))
|
||||
{
|
||||
senderDisplayName = ChatParser.ParseText(player.DisplayName ?? player.Name);
|
||||
if (string.IsNullOrWhiteSpace(senderDisplayName))
|
||||
senderDisplayName = player.DisplayName ?? player.Name;
|
||||
else
|
||||
senderDisplayName += "§r";
|
||||
}
|
||||
}
|
||||
|
||||
bool verifyResult;
|
||||
if (!isOnlineMode)
|
||||
verifyResult = false;
|
||||
|
|
@ -1382,8 +1395,8 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
byte windowID = dataTypes.ReadNextByte(packetData);
|
||||
short actionID = dataTypes.ReadNextShort(packetData);
|
||||
bool accepted = dataTypes.ReadNextBool(packetData);
|
||||
if (!accepted && actionID > 0)
|
||||
SendWindowConfirmation(windowID, actionID, accepted);
|
||||
if (!accepted)
|
||||
SendWindowConfirmation(windowID, actionID, true);
|
||||
}
|
||||
break;
|
||||
case PacketTypesIn.ResourcePackSend:
|
||||
|
|
|
|||
|
|
@ -47,8 +47,10 @@ 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 = message.isJson ? ParseText(chatContent, links) : chatContent;
|
||||
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 text;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue