Whitelist

Base: /api/whitelist

Manage server whitelist

Handler: WhitelistHandler
GET /api/whitelist

Show Whitelist

List of all whitelisted players.

Response Example

{"enabled":true,"players":["Steve","Alex","Notch"]}

cURL

curl http://localhost:5550/api/whitelist
POST /api/whitelist/add

Add Player

Adds a player to the whitelist.

Request Body

Field Type Required Description
player string Yes Player name

Response Example

{"success":true,"message":"Player Steve added to whitelist"}

cURL

curl -X POST http://localhost:5550/api/whitelist/add \
  -H 'Content-Type: application/json' \
  -d '{"player":"Steve"}'
DELETE /api/whitelist/{player}

Remove Player

Removes a player from the whitelist.

Parameters

Name Type Required Description
player string Yes Player name

Response Example

{"success":true,"message":"Player Steve removed from whitelist"}

cURL

curl -X DELETE http://localhost:5550/api/whitelist/Steve
POST /api/whitelist/toggle

Toggle Whitelist

Enables or disables the whitelist.

Request Body

Field Type Required Description
enabled boolean Yes true = enable, false = disable

Response Example

{"success":true,"message":"Whitelist enabled"}

cURL

curl -X POST http://localhost:5550/api/whitelist/toggle \
  -H 'Content-Type: application/json' \
  -d '{"enabled":true}'