Return a invalid value when no reply
This commit is contained in:
parent
178cc201c1
commit
f5d1d741cb
2 changed files with 4 additions and 1 deletions
|
@ -60,6 +60,9 @@ class PacketClient {
|
|||
}
|
||||
|
||||
Future<CompoundTag> send(IPacket packet) async {
|
||||
if (!connected) {
|
||||
return CompoundTag();
|
||||
}
|
||||
socket!.add(await NbtIo.writeToStream(packet.encodeTag().asCompoundTag()));
|
||||
CompoundTag ct = CompoundTag();
|
||||
socket!.listen((data) async {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue