Skip to content

explodingcamera/minecraft-restadmin

Repository files navigation

RestAdmin

A RESTful API for managing a Minecraft server. Supports Minecraft 1.21.1 with the Fabric mod loader. Currently very limited in functionality.

Authentication

All endpoints require a valid Authorization header with the format:

Authorization: Bearer <token>

The token must be at least 12 characters long and can be set in ./config/restadmin.json.

{
  "port": 7070,
  "host": "0.0.0.0",
  "token": "your_token_here"
}

Endpoints

General

Get Connected Players

  • GET /players
  • Description: Retrieves the list of connected players.
  • Response: JSON array of Player objects.

Whitelist

Get Whitelist

  • GET /whitelist
  • Description: Retrieves the list of whitelisted players.
  • Response: JSON array of player names.

Check Whitelist Status

  • GET /whitelist/{username_or_uuid}
  • Description: Checks if a player (by username or UUID) is on the whitelist.
  • Response: Player object.

Add to Whitelist

  • POST /whitelist/{username_or_uuid}
  • Description: Adds a player (by username or UUID) to the whitelist.
  • Response: Player object.

Remove from Whitelist

  • DELETE /whitelist/{username_or_uuid}
  • Description: Removes a player (by username or UUID) from the whitelist.
  • Response: Player object.

Types

Player

type Player = {
  name: string;
  id: string;
};

About

A RESTful API for managing Minecraft servers (fabric)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages