mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
feat: enhance Protocol18 and SocketWrapper for improved functionality
- Added support for the new world border hit flag in Protocol18 for protocol version 1.21.2. - Updated SocketWrapper to throw a SocketException if SendDataRAW is called when not connected, improving error handling. These changes enhance the protocol handling and error management in the Minecraft Console Client.
This commit is contained in:
parent
8456e363f5
commit
dcfff3f1ba
2 changed files with 8 additions and 2 deletions
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Net.Sockets;
|
||||
using MinecraftClient.Crypto;
|
||||
|
||||
|
|
@ -90,6 +90,9 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
/// <param name="buffer">data to send</param>
|
||||
public void SendDataRAW(byte[] buffer)
|
||||
{
|
||||
if (!IsConnected())
|
||||
throw new SocketException((int)SocketError.NotConnected);
|
||||
|
||||
if (encrypted)
|
||||
s!.Write(buffer, 0, buffer.Length);
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue