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
|
|
@ -1 +1 @@
|
||||||
Subproject commit 225b10ec96af5c8f179a008cc442b502d23bc601
|
Subproject commit 42074c449b8cf32e035f982bd83af6dcf75bc764
|
||||||
|
|
@ -553,6 +553,19 @@ namespace MinecraftClient.Protocol.Handlers
|
||||||
(messageTypeEnum == ChatParser.MessageType.TEAM_MSG_COMMAND_INCOMING || messageTypeEnum == ChatParser.MessageType.TEAM_MSG_COMMAND_OUTGOING))
|
(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;
|
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;
|
bool verifyResult;
|
||||||
if (!isOnlineMode)
|
if (!isOnlineMode)
|
||||||
verifyResult = false;
|
verifyResult = false;
|
||||||
|
|
@ -1382,8 +1395,8 @@ namespace MinecraftClient.Protocol.Handlers
|
||||||
byte windowID = dataTypes.ReadNextByte(packetData);
|
byte windowID = dataTypes.ReadNextByte(packetData);
|
||||||
short actionID = dataTypes.ReadNextShort(packetData);
|
short actionID = dataTypes.ReadNextShort(packetData);
|
||||||
bool accepted = dataTypes.ReadNextBool(packetData);
|
bool accepted = dataTypes.ReadNextBool(packetData);
|
||||||
if (!accepted && actionID > 0)
|
if (!accepted)
|
||||||
SendWindowConfirmation(windowID, actionID, accepted);
|
SendWindowConfirmation(windowID, actionID, true);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PacketTypesIn.ResourcePackSend:
|
case PacketTypesIn.ResourcePackSend:
|
||||||
|
|
|
||||||
|
|
@ -47,8 +47,10 @@ namespace MinecraftClient.Protocol
|
||||||
/// <returns>Returns the translated text</returns>
|
/// <returns>Returns the translated text</returns>
|
||||||
public static string ParseSignedChat(ChatMessage message, List<string>? links = null)
|
public static string ParseSignedChat(ChatMessage message, List<string>? links = null)
|
||||||
{
|
{
|
||||||
string chatContent = Config.Signature.ShowModifiedChat && message.unsignedContent != null ? message.unsignedContent : message.content;
|
string chatContent = (Config.Signature.ShowModifiedChat && message.unsignedContent != null) ? message.unsignedContent : message.content;
|
||||||
string content = message.isJson ? ParseText(chatContent, links) : chatContent;
|
string content = ParseText(chatContent, links);
|
||||||
|
if (string.IsNullOrEmpty(content))
|
||||||
|
content = chatContent;
|
||||||
string sender = message.displayName!;
|
string sender = message.displayName!;
|
||||||
|
|
||||||
string text;
|
string text;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue