Bans
Base: /api/bans
Ban and unban players, also offline
Handler: BansHandler
GET
/api/bans
List bans
Returns all banned players with reason and date.
Response Example
[
{
"player": "Steve",
"reason": "griefing",
"bannedAt": "2026-01-01T00:00:00Z"
}
]
cURL
curl -X GET 'http://localhost:5550/api/bans' \
-H 'X-Admin-Token: YOUR_TOKEN'
Internal Behavior
Reads the ban list of the server (bans.json).
POST
/api/bans
Ban player
Bans a player, online or offline. Unknown names are resolved through the Hytale profile service.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
player
|
string | Yes | Player name or UUID |
reason
|
string | No | Ban reason |
Response Example
{
"success": true,
"player": "Steve",
"reason": "griefing",
"kicked": true
}
cURL
curl -X POST 'http://localhost:5550/api/bans' \
-H 'X-Admin-Token: YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"player": "Griefer123", "reason": "Griefing"}'
Internal Behavior
Uses Hytale's access control module, falls back to the native ban command; online players are kicked.
DELETE
/api/bans/{player}
Unban player
Removes a ban.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
player
|
string | Yes | Player name or UUID (URL encoded) |
Response Example
{
"success": true,
"player": "Steve"
}
cURL
curl -X DELETE 'http://localhost:5550/api/bans/Griefer123' \
-H 'X-Admin-Token: YOUR_TOKEN'
Internal Behavior
Uses the access control module or the native unban command; success only if Hytale confirms.