mirror of
https://github.com/gamedig/node-gamedig.git
synced 2024-11-17 09:18:31 +01:00
Export all minecraft json in raw object. Use modern minecraftping for all minecraft queries.
This commit is contained in:
parent
82961e550c
commit
9b9277172d
2 changed files with 7 additions and 6 deletions
|
@ -168,9 +168,11 @@ mohbt|Medal of Honor: Breakthrough|gamespy1|port=12203,port_query_offset=97
|
|||
moh2010|Medal of Honor 2010|battlefield|port=7673,port_query=48888
|
||||
mohwf|Medal of Honor: Warfighter|battlefield|port=25200,port_query_offset=22000
|
||||
|
||||
minecraft|Minecraft|gamespy3|port=25565,maxAttempts=2|srvRecord=_minecraft._tcp,doc_notes=minecraft
|
||||
minecraft|Minecraft|minecraft|port=25565|srvRecord=_minecraft._tcp,doc_notes=minecraft
|
||||
# Legacy name
|
||||
minecraftping|Minecraft|minecraft|port=25565|srvRecord=_minecraft._tcp,doc_notes=minecraft
|
||||
|
||||
minecraftpe|Minecraft: Pocket Edition|gamespy3|port=19132,maxAttempts=2
|
||||
minecraftping|Minecraft|minecraftping|port=25565|srvRecord=_minecraft._tcp,doc_notes=minecraft
|
||||
mnc|Monday Night Combat|valve|port=7777,port_query=27016
|
||||
mtavc|Multi Theft Auto: Vice City|ase|port=22003,port_query_offset=123
|
||||
mtasa|Multi Theft Auto: San Andreas|ase|port=22003,port_query_offset=123
|
||||
|
|
|
@ -14,7 +14,7 @@ function buildPacket(id,data) {
|
|||
]);
|
||||
}
|
||||
|
||||
class MinecraftPing extends require('./core') {
|
||||
class Minecraft extends require('./core') {
|
||||
run(state) {
|
||||
let receivedData;
|
||||
|
||||
|
@ -75,9 +75,8 @@ class MinecraftPing extends require('./core') {
|
|||
return this.fatal('Invalid JSON');
|
||||
}
|
||||
|
||||
state.raw.version = json.version.name;
|
||||
state.raw = json;
|
||||
state.maxplayers = json.players.max;
|
||||
state.raw.description = json.description.text;
|
||||
if(json.players.sample) {
|
||||
for(const player of json.players.sample) {
|
||||
state.players.push({
|
||||
|
@ -96,4 +95,4 @@ class MinecraftPing extends require('./core') {
|
|||
}
|
||||
}
|
||||
|
||||
module.exports = MinecraftPing;
|
||||
module.exports = Minecraft;
|
Loading…
Reference in a new issue