mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
commit
255a44a9cc
1 changed files with 4 additions and 4 deletions
|
|
@ -778,12 +778,12 @@ namespace MinecraftClient
|
||||||
byte[] chat = new byte[3 + (message.Length * 2)];
|
byte[] chat = new byte[3 + (message.Length * 2)];
|
||||||
chat[0] = (byte)3;
|
chat[0] = (byte)3;
|
||||||
|
|
||||||
byte[] msglen = new byte[2];
|
byte[] msglen;
|
||||||
msglen = BitConverter.GetBytes((short)message.Length);
|
msglen = BitConverter.GetBytes((short)message.Length);
|
||||||
Array.Reverse(msglen);
|
Array.Reverse(msglen);
|
||||||
msglen.CopyTo(chat, 1);
|
msglen.CopyTo(chat, 1);
|
||||||
|
|
||||||
byte[] msg = new byte[message.Length * 2];
|
byte[] msg;
|
||||||
msg = Encoding.Unicode.GetBytes(message);
|
msg = Encoding.Unicode.GetBytes(message);
|
||||||
Array.Reverse(msg);
|
Array.Reverse(msg);
|
||||||
msg.CopyTo(chat, 3);
|
msg.CopyTo(chat, 3);
|
||||||
|
|
@ -801,12 +801,12 @@ namespace MinecraftClient
|
||||||
byte[] reason = new byte[3 + (message.Length * 2)];
|
byte[] reason = new byte[3 + (message.Length * 2)];
|
||||||
reason[0] = (byte)0xff;
|
reason[0] = (byte)0xff;
|
||||||
|
|
||||||
byte[] msglen = new byte[2];
|
byte[] msglen;
|
||||||
msglen = BitConverter.GetBytes((short)message.Length);
|
msglen = BitConverter.GetBytes((short)message.Length);
|
||||||
Array.Reverse(msglen);
|
Array.Reverse(msglen);
|
||||||
msglen.CopyTo(reason, 1);
|
msglen.CopyTo(reason, 1);
|
||||||
|
|
||||||
byte[] msg = new byte[message.Length * 2];
|
byte[] msg;
|
||||||
msg = Encoding.Unicode.GetBytes(message);
|
msg = Encoding.Unicode.GetBytes(message);
|
||||||
Array.Reverse(msg);
|
Array.Reverse(msg);
|
||||||
msg.CopyTo(reason, 3);
|
msg.CopyTo(reason, 3);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue