You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- 🛠️ Fixed bug from issue #4 that caused incorrect parsing of status responses from modded servers.
- ⚙️ Added support for both CommonJS and ES module exports, and updated the module target to ESNext.
- ⚙️ Bumped the default protocol version from `767` (1.21.1) to `769` (1.21.4)
view CHANGELOG.md
- 🛠️ Fixed bug from issue [#4](https://github.com/woodendoors7/MinecraftStatusPinger/issues/4) that caused incorrect parsing of status responses from modded servers.
8
+
- ⚙️ Added support for both CommonJS and ES module exports, and updated the module target to ESNext.
9
+
- ⚙️ Bumped the default protocol version from `767` (1.21.1) to `769` (1.21.4)
> Either an IP, or a hostname of the server. (alias: hostname)
78
+
> An IP address or hostname of the server. (alias: hostname)
78
79
* <b>`port?:`</b> number <i> `default: 25565`</i>
79
80
> Port of the server. SRV lookup is disabled when using ports other than 25565.
80
81
* <b>`timeout?:`</b> number <i>`default: 10000`</i>
81
-
> How long until an error is thrown if the transaction still hasn't finished. Default is 10 seconds.
82
+
> The time (in milliseconds) to wait for a response before throwing an error if the transaction isn’t completed. (Default: 10 seconds)
82
83
* <b>`ping?:`</b> boolean <i>`default: true`</i>
83
84
> Whether to send a payload at the end to measure the server latency. If false, the `latency` field will be null.
84
-
* <b>`protocolVersion?:`</b> number <i>`default: 767`</i>
85
-
> Protocol version to send to the server to simulate different Minecraft client versions. Here, you can see the [Protocol Version Numbers](https://wiki.vg/Protocol_version_numbers). The current default protocol version is for 1.21.1 (767) and will be irregularly updated to newer versions.
85
+
* <b>`protocolVersion?:`</b> number <i>`default: 769`</i>
86
+
> The protocol version sent to the server to simulate different Minecraft client versions. Refer to the [Protocol Version Numbers](https://wiki.vg/Protocol_version_numbers) for details. It is recommended to set this explicitly, as it will be updated periodically through minor version bumps. The default is 769 (Minecraft 1.21.4).
> Whether to perform a SRV lookup on the provided hostname. Set to `true` in order to skip. Useful to disable when you're only looking up the basic DNS records and a server with a specific port.
90
+
> Whether to perform a SRV lookup on the provided hostname. Set to `false`to skip the lookup, which is useful when you're only looking for basic DNS records. It is automatically disabled when you define a port different from 25565.
> Whether to parse the JSON `status` field. Useful to disable when you only need the raw plaintext response. If false, the `status` field will be null.
92
93
* ServerStatus
93
94
* <b>`latency?:`</b> number
94
95
> The time it takes to receive back a response after sending a small payload to a server, in milliseconds. Will be null if the `ping` option is false.
95
96
* <b>`status?:`</b> DynamicObject
96
-
> Parsed status response from the server. Will be null if the status fails to parse, or if disableJSONParse is true. <ahref="https://pinger.floppa.hair/responses/">Example of a valid Status Response.</a>
97
+
> Parsed status response from the server. This field will be null if parsing fails or if `JSONParse` is false. <ahref="https://pinger.floppa.hair/responses/">Example of a valid Status Response.</a>
97
98
* <b>`statusRaw:`</b> string
98
99
> Plaintext status response in the form of JSON. Useful when `status` fails to parse.
> It wraps the `dns.setServers` function, useful for looking up SRV records through different DNS servers. <br>
102
+
> Wraps the `dns.setServers` function, useful for quicker lookups through different DNS servers. <br>
102
103
The first IP in the array will always be used first, others will be tried if the first one is unreachable. <br><br>
103
-
Accepts an array of hostnames or IP addresses of DNS servers. It will either return true, or throw an error.
104
-
104
+
Accepts an array of hostnames or IP addresses of DNS servers. It will either return true, or throw an error, otherwise, it uses the default DNS servers of your computer.<br><br>
105
+
❗ Changing the default DNS servers is recommended, if you're doing tons of lookups at once.
// Cloudflare is usually the fastest for DNS queries.
114
+
//Note: Cloudflare is typically the fastest for DNS queries.
112
115
```
113
-
If you never changed the DNS settings of your computer, the default DNS server will be your ISP's.<br>
114
-
<codestyle="color : darkorange">❗ I recommend changing your default DNS servers if you're doing thousands of lookups, such as for mass scanning.</code><br>
Copy file name to clipboardExpand all lines: package.json
+9-10Lines changed: 9 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@
9
9
"CHANGELOG.md",
10
10
"README.md"
11
11
],
12
-
"version": "1.2.1",
12
+
"version": "1.2.2",
13
13
"description": "A modern library for pinging Minecraft servers and getting their status and playerlist, written in TypeScript with zero dependencies.",
0 commit comments