server

.servers() is used to get information about a specific server

.server(Server Name / ID)

Get information about a specific player server.

Parameter

Type

Required

Description

serverName

string

true

The name of the server you want info for

Example:

// Dependencies
const CubedCraft = require('cubed-api');

// Server Details
const server = 'SERVER_NAME';

// Getting information about the server
CubedCraft.API.server(server).then(server => {
    console.log(server);
})

Example Response:

{
    "server": {
        "id": "836deeb1fbac45a5bc37667644c306ff",
        "name": "Warzone",
        "owner_uuid": "f3448a69d94240a8b52cf80f950989c9",
        "software": "spigot",
        "version": "1.8",
        "online": true,
        "maxPlayers": 100,
        "onlinePlayers": 2,
        "players": [
            {
                "username": "Partydragen",
                "uuid": "f3448a69-d942-40a8-b52c-f80f950989c9",
                "version_protocol": 753,
                "guild_name": "Boss"
            },
            {
                "username": "Samerton",
                "uuid": "2f778755-502c-4fb7-ae96-493d6429e8f3a",
                "version_protocol": 47,
                "guild_name": null
            }
        ],
        "votes": 43,
        "motd": "CubedCraft Official Warzone",
        "created_friendly": "13 Sep 2020",
        "created": 1599972866400,
        "last_online_friendly": "13 Sep 2020",
        "last_online": 1599972866400,
        "plan_name": "Level-7"
        "plan_id": 8
        "boosters": 2,
        "boosters_list": [
            {
                "username": "Partydragen",
                "uuid": "f3448a69-d942-40a8-b52c-f80f950989c9",
                "boosted_since": 1599731759804,
                "boosted_since_friendly": "10 Sep 2020"
            },
            {
                "username": "CubedCraft",
                "uuid": "a6824fe1-15ea-4e95-880f-2ad1e7e0faed",
                "boosted_since": 1599737759804,
                "boosted_since_friendly": "10 Sep 2020"
            }
        ],
        "official": true,
        "suspended": false,
        "visibility": true,
        "displayitem": "DIAMOND_SWORD"
    }
}

Last updated

Was this helpful?