Skip to content

Commit 83ad03d

Browse files
committed
Bump version to 0.3.3, update changelog and apply dartfmt
1 parent 3c8b5f3 commit 83ad03d

File tree

4 files changed

+19
-25
lines changed

4 files changed

+19
-25
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 0.3.3
4+
5+
- Implement server pinging
6+
- Generalized NBT file read/write internally.
7+
38
## 0.3.2
49

510
- Custom NBT File exceptions

example/servers_nbt_example.dart

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -17,29 +17,17 @@ void main() async {
1717

1818
/// If you have not supplied a servers.dat file to read from, we'll
1919
/// fill in some basic servers as an example.
20-
nbtFile.root ??= NbtCompound(
21-
name: '',
22-
children: [
23-
NbtList(
24-
name: 'servers',
25-
children: <NbtCompound>[
26-
NbtCompound(
27-
name: '',
28-
children: [
29-
NbtString(
30-
name: 'ip',
31-
value: 'mc.hypixel.net'
32-
),
33-
NbtString(
34-
name: 'name',
35-
value: 'Hypixel'
36-
),
37-
]
38-
),
39-
],
40-
)
41-
]
42-
);
20+
nbtFile.root ??= NbtCompound(name: '', children: [
21+
NbtList(
22+
name: 'servers',
23+
children: <NbtCompound>[
24+
NbtCompound(name: '', children: [
25+
NbtString(name: 'ip', value: 'mc.hypixel.net'),
26+
NbtString(name: 'name', value: 'Hypixel'),
27+
]),
28+
],
29+
)
30+
]);
4331

4432
/// As we now have NBT data stored in our [NbtFile], we
4533
/// will begin reading from it and pinging the first

lib/src/server_ping.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ Future<ResponsePacket?> pingUri(String serverUri) async {
5252

5353
/// Ping a single server. [port] will default to 25565 as that is the
5454
/// default Minecraft server port. This method is for post 1.6 servers.
55-
Future<ResponsePacket?> ping(String serverUri, {int port = 25565, Duration timeout = const Duration(seconds: 30)}) async {
55+
Future<ResponsePacket?> ping(String serverUri,
56+
{int port = 25565, Duration timeout = const Duration(seconds: 30)}) async {
5657
try {
5758
final socket = await Socket.connect(serverUri, port, timeout: timeout);
5859
final stream = socket.asBroadcastStream();

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: dart_minecraft
22
description: Utilities for Minecraft and Mojang Web-APIs and reading/writing NBT Files.
3-
version: 0.3.2
3+
version: 0.3.3
44
homepage: https://github.com/spnda/dart_minecraft
55

66
environment:

0 commit comments

Comments
 (0)