';
if (findErrorMessage(lastEntry.error)) {
newStatus += findErrorMessage(lastEntry.error);
@@ -328,7 +348,7 @@ $(document).ready(function() {
\
' + info.name + ' ' + info.type + '
\
' + info.ip + '\
-
\
+
\
Waiting\
\
\
diff --git a/config.json b/config.json
index 70b9641..eaaf70a 100644
--- a/config.json
+++ b/config.json
@@ -31,5 +31,16 @@
"minigames": "Minigame Networks",
"pocket": "Pocket Edition Networks"
},
+ "versions": {
+ "PC": [
+ 4,
+ 5,
+ 47,
+ 107
+ ],
+ "PE": [
+ 0
+ ]
+ },
"categoriesVisible": true
}
diff --git a/lib/ping.js b/lib/ping.js
index 3faa239..bc1bd1e 100644
--- a/lib/ping.js
+++ b/lib/ping.js
@@ -4,7 +4,7 @@ var mcpc_ping = require('mc-ping-updated');
var util = require('./util');
// This is a wrapper function for mc-ping-updated, mainly used to convert the data structure of the result.
-function pingMinecraftPC(host, port, timeout, callback) {
+function pingMinecraftPC(host, port, timeout, callback, version) {
var startTime = util.getCurrentTimeMs();
mcpc_ping(host, port, function(err, res) {
@@ -22,7 +22,7 @@ function pingMinecraftPC(host, port, timeout, callback) {
favicon: res.favicon
});
}
- }, timeout);
+ }, timeout, version);
}
// This is a wrapper function for mcpe-ping, mainly used to convert the data structure of the result.
@@ -46,12 +46,12 @@ function pingMinecraftPE(host, port, timeout, callback) {
}, timeout);
}
-exports.ping = function(host, port, type, timeout, callback) {
+exports.ping = function(host, port, type, timeout, callback, version) {
if (type === 'PC') {
- pingMinecraftPC(host, port || 25565, timeout, callback);
+ pingMinecraftPC(host, port || 25565, timeout, callback, version);
} else if (type === 'PE') {
pingMinecraftPE(host, port || 19132, timeout, callback);
} else {
throw new Error('Unsupported type: ' + type);
}
-};
\ No newline at end of file
+};
diff --git a/package.json b/package.json
index 9b4a782..6f1e184 100644
--- a/package.json
+++ b/package.json
@@ -4,7 +4,7 @@
"description": "A Minecraft server tracker that lets you focus on the basics.",
"main": "app.js",
"dependencies": {
- "mc-ping-updated": "0.0.7",
+ "mc-ping-updated": "0.1.0",
"mcpe-ping": "0.0.3",
"mime": "^1.3.4",
"request": "^2.65.0",