mirror of
https://github.com/Dinnerbone/mcstatus.git
synced 2026-04-06 03:51:23 +08:00
Fixed order of connection.write decoding
This commit is contained in:
@@ -13,10 +13,10 @@ class Connection:
|
|||||||
return result
|
return result
|
||||||
|
|
||||||
def write(self, data):
|
def write(self, data):
|
||||||
if isinstance(data, str):
|
|
||||||
data = bytearray(data)
|
|
||||||
if isinstance(data, Connection):
|
if isinstance(data, Connection):
|
||||||
data = bytearray(data.flush())
|
data = bytearray(data.flush())
|
||||||
|
if isinstance(data, str):
|
||||||
|
data = bytearray(data)
|
||||||
self.sent.extend(data)
|
self.sent.extend(data)
|
||||||
|
|
||||||
def receive(self, data):
|
def receive(self, data):
|
||||||
|
|||||||
Reference in New Issue
Block a user