diff --git a/lib/ping.js b/lib/ping.js index 5898e1a..82d7e33 100644 --- a/lib/ping.js +++ b/lib/ping.js @@ -18,7 +18,7 @@ function ping (serverRegistration, timeout, callback, version) { } else { const payload = { players: { - online: capPlayerCount(host, parseInt(res.players.online)) + online: capPlayerCount(serverRegistration.data.ip, parseInt(res.players.online)) }, version: parseInt(res.version.protocol) } diff --git a/package-lock.json b/package-lock.json index 7cd31de..c79760e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5505,9 +5505,9 @@ } }, "mcping-js": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/mcping-js/-/mcping-js-1.2.1.tgz", - "integrity": "sha512-s0MRsyDnaxhG0lt1JqJl6tBewZkRj0fzeq/oU/aPSF74PrFW/ZWyzNOgh+NO5hY84U2XnRnscAZ0A0MIIEvC4A==" + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/mcping-js/-/mcping-js-1.3.0.tgz", + "integrity": "sha512-DytO/U0+N7EbK3BhL6hvmN6HEoOFh3oK91cXkzLEo6W17+e8cx9KhEvTnTCGeduFHAG9huIdApRubdl40vrNvg==" }, "md5.js": { "version": "1.3.5", diff --git a/package.json b/package.json index d519762..1add437 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "dependencies": { "finalhandler": "^1.1.2", "mcpe-ping-fixed": "0.0.3", - "mcping-js": "^1.2.1", + "mcping-js": "^1.3.0", "request": "2.88.2", "serve-static": "^1.14.1", "sqlite3": "4.1.1",