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 parseAdvertiseString = (advertiseStr) => {
|
||||||
const parts = advertiseStr.split(';');
|
const parts = advertiseStr.split(';');
|
||||||
const parsedParts = {
|
return {
|
||||||
gameId: parts[0],
|
gameId: parts[0],
|
||||||
description: parts[1],
|
description: parts[1],
|
||||||
protocolVersion: parts[2],
|
protocolVersion: parts[2],
|
||||||
|
@ -50,8 +50,6 @@ const parseAdvertiseString = (advertiseStr) => {
|
||||||
name: parts[7],
|
name: parts[7],
|
||||||
mode: parts[8]
|
mode: parts[8]
|
||||||
};
|
};
|
||||||
|
|
||||||
return parsedParts;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -146,9 +144,8 @@ const ping = (host, port = 19132, cb, timeout = 5000) => {
|
||||||
case 0x1c: {
|
case 0x1c: {
|
||||||
const pong = UNCONNECTED_PONG(msg);
|
const pong = UNCONNECTED_PONG(msg);
|
||||||
const clientData = {
|
const clientData = {
|
||||||
name: pong.name,
|
|
||||||
version: {
|
version: {
|
||||||
gameVersion: pong.gameVersion,
|
name: pong.name,
|
||||||
protocol: pong.protocolVersion
|
protocol: pong.protocolVersion
|
||||||
},
|
},
|
||||||
players: {
|
players: {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@minescope/mineping",
|
"name": "@minescope/mineping",
|
||||||
"version": "1.3.0",
|
"version": "1.2.2",
|
||||||
"description": "Ping both Minecraft Bedrock and Java servers.",
|
"description": "Ping both Minecraft Bedrock and Java servers.",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"types": "types/index.d.ts",
|
"types": "types/index.d.ts",
|
||||||
|
|
|
@ -8,9 +8,8 @@ export type BedrockPingOptions = {
|
||||||
};
|
};
|
||||||
|
|
||||||
export type BedrockPingResponse = {
|
export type BedrockPingResponse = {
|
||||||
name: string;
|
|
||||||
version: {
|
version: {
|
||||||
gameVersion: string;
|
name: string;
|
||||||
protocol: string;
|
protocol: string;
|
||||||
};
|
};
|
||||||
players: {
|
players: {
|
||||||
|
|
Loading…
Reference in New Issue