Sign inSign up

msrst/minecraft_status_bridge

By msrst

•Updated over 5 years ago

Image
0

439

msrst/minecraft_status_bridge repository overview

⁠Minecraft Status Bridge

Every Minecraft Server offers a Status Handshake, which can be used to query the MOTD, current players and more.
minecraft_server_bridge is a nodejs server which allows to query this as JSON from a REST endpoint:

curl 'http://localhost:4100/?host=mc.gsservers.net'

{
"description": {
    "text": "§r           §3§lGS§b§lServers §8§l➤ §61.15.2 Survival\n §a§lJobs §8§l◆ §9§lMcMMMO §8§l◆ §e§lEvents §8§l◆ §d§lDiscord §8§l◆ §c§lCrates"
},
"players": {
    "max": 35,
    "online": 4,
    "sample": [
    {
        "id": "e3478fa5-d6d6-4613-8649-693e9885783b",
        "name": "SmolTiddyLoliGF"
    },
    {
        "id": "b7dc721f-2103-4af5-8ec0-76048e472780",
        "name": "Nosturimies"
    },
    {
        "id": "643de34c-ecbd-4957-8e0d-0f09bbaecd71",
        "name": "Hedhed"
    },
    {
        "id": "60f0d204-2eb9-4f5f-a486-1bea15cf8d63",
        "name": "Tracy_Grimshaw"
    }
    ]
},
"version": {
    "name": "Paper 1.15.2",
    "protocol": 578
},
"favicon": "data:image/png;base64,iVBORw0 ... (FAVICON SHORTENED)"
}

(This was done on 1st May 2020 on a server I randomly selected from server lists, maybe the server is down now. I shortened the favicon base64 string here and also changed the player's UUIDs to a random one to protect their privacy.)

The bridge can be used, for example, to input the data to another tool like huginn⁠.
Another use case would be to display the current status on your website.

⁠Setup with Docker

docker run -p 4100:4100 -d msrst/minecraft_status_bridge This also works for raspberry pi, because I also built it for armv7.

⁠Usage

For more info, have a look on the github readme⁠.

⁠License

Copyright (C) Matthias Rosenthal
License: GPL3⁠
Applies to all files

Tag summary

Content type

Image

Digest

Size

341.5 MB

Last updated

over 5 years ago

docker pull msrst/minecraft_status_bridge