Compare commits
No commits in common. "9d25aaf4ea6a244f03d7adb1bf693089ec5072cf" and "afdaa9eb3e893275bbd8b36677a813df28c18e16" have entirely different histories.
9d25aaf4ea
...
afdaa9eb3e
|
@ -40,7 +40,7 @@ const readStringFromBuffer = (buffer, offset) => {
|
|||
*/
|
||||
const parseAdvertiseString = (advertiseStr) => {
|
||||
const parts = advertiseStr.split(';');
|
||||
const parsedParts = {
|
||||
return {
|
||||
gameId: parts[0],
|
||||
description: parts[1],
|
||||
protocolVersion: parts[2],
|
||||
|
@ -50,8 +50,6 @@ const parseAdvertiseString = (advertiseStr) => {
|
|||
name: parts[7],
|
||||
mode: parts[8]
|
||||
};
|
||||
|
||||
return parsedParts;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -146,9 +144,8 @@ const ping = (host, port = 19132, cb, timeout = 5000) => {
|
|||
case 0x1c: {
|
||||
const pong = UNCONNECTED_PONG(msg);
|
||||
const clientData = {
|
||||
name: pong.name,
|
||||
version: {
|
||||
gameVersion: pong.gameVersion,
|
||||
name: pong.name,
|
||||
protocol: pong.protocolVersion
|
||||
},
|
||||
players: {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@minescope/mineping",
|
||||
"version": "1.3.0",
|
||||
"version": "1.2.2",
|
||||
"description": "Ping both Minecraft Bedrock and Java servers.",
|
||||
"main": "index.js",
|
||||
"types": "types/index.d.ts",
|
||||
|
@ -19,4 +19,4 @@
|
|||
"node": ">=14"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,9 +8,8 @@ export type BedrockPingOptions = {
|
|||
};
|
||||
|
||||
export type BedrockPingResponse = {
|
||||
name: string;
|
||||
version: {
|
||||
gameVersion: string;
|
||||
name: string;
|
||||
protocol: string;
|
||||
};
|
||||
players: {
|
||||
|
|
Loading…
Reference in New Issue