diff --git a/lib/nbt/impl/CompoundTag.dart b/lib/nbt/impl/CompoundTag.dart index 61381b3..958af9b 100644 --- a/lib/nbt/impl/CompoundTag.dart +++ b/lib/nbt/impl/CompoundTag.dart @@ -198,7 +198,7 @@ class CompoundTag extends Tag implements Map { @override Tag? remove(Object? key) { if (key is Tag && value.containsKey(key)) - (key as Tag).setParentTagType(TagType.End); + (key).setParentTagType(TagType.End); return value.remove(key); } diff --git a/lib/packets/packets.dart b/lib/packets/packets.dart index 107100d..09b9ac7 100644 --- a/lib/packets/packets.dart +++ b/lib/packets/packets.dart @@ -77,7 +77,7 @@ class PacketClient { connected = true; lastIP = IPAddress; this.port = port; - } catch (E, stack) { + } catch (E) { connected = false; socket = null; }