Players
Base: /api/players
The players section is the largest part of the API. You list online players with position, world, game mode, health and stats, fetch the list of all known players and read the inventory. On top of that come actions such as kicking, healing, teleporting, giving items, granting operator rights, switching the game mode and changing single inventory slots. Typical uses are a moderation panel, a Discord bot that manages players, or a website with an online list. Players are addressed by name. Most actions need a player who is online right now.
Endpoints
/api/players
List players
Returns all online players with position, world, game mode, health and stats, plus offline players known to the mod.
Response Example
[
{
"name": "Steve",
"uuid": "1234...",
"world": "default",
"avatar": "<base64>",
"x": 10.5,
"y": 64.0,
"z": -3.2,
"gamemode": "Adventure",
"health": 90,
"maxHealth": 100,
"stamina": 80,
"maxStamina": 100,
"mana": 0,
"maxMana": 100,
"defence": 12,
"op": false,
"online": true
}
]
cURL
curl -X GET 'http://localhost:5550/api/players' \
-H 'X-Admin-Token: YOUR_TOKEN'
Internal Behavior
/api/players/known
Known players
Slim list of all players who have been on the server, with uuid, name, online, gamemode, world and lastSeen (millisecond timestamp).
Response Example
[
{
"uuid": "1234...",
"name": "Steve",
"online": true,
"gamemode": "Adventure",
"world": "default",
"lastSeen": 1737000000000
}
]
cURL
curl -X GET 'http://localhost:5550/api/players/known' \
-H 'X-Admin-Token: YOUR_TOKEN'
Internal Behavior
/api/players/{name}
Get player
Returns the same detailed data as the list for one online player.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
name
|
string | Yes | Player name |
Response Example
{
"name": "Steve",
"uuid": "1234...",
"world": "default",
"x": 10.5,
"y": 64.0,
"z": -3.2,
"gamemode": "Adventure",
"health": 90,
"maxHealth": 100,
"op": false,
"found": true
}
cURL
curl -X GET 'http://localhost:5550/api/players/Eranio' \
-H 'X-Admin-Token: YOUR_TOKEN'
Internal Behavior
/api/players/{name}/inventory
Get inventory
Returns hotbar, storage, armor, utility, backpack and tools with item IDs, amounts and icons.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
name
|
string | Yes | Player name |
Response Example
{
"player": "Steve",
"hotbar": [
{
"id": "hytale:sword_iron",
"count": 1,
"slot": 0,
"durability": 90,
"maxDurability": 100,
"icon": "<base64>"
}
],
"storage": [],
"armor": [],
"utility": [],
"backpack": [],
"backpackCapacity": 18,
"uniqueItemUsages": [
"Upgrade_Backpack_1"
]
}
cURL
curl -X GET 'http://localhost:5550/api/players/Eranio/inventory' \
-H 'X-Admin-Token: YOUR_TOKEN'
Internal Behavior
/api/players/{name}/kick
Kick player
Disconnects an online player with a message.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
name
|
string | Yes | Player name |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
reason
|
string | No | Message shown to the player, default "Kicked by admin" |
Response Example
{
"success": true,
"player": "Steve"
}
cURL
curl -X POST 'http://localhost:5550/api/players/Eranio/kick' \
-H 'X-Admin-Token: YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"reason": "Please read the rules"}'
Internal Behavior
/api/players/{name}/op
Grant OP
Gives the player operator rights.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
name
|
string | Yes | Player name |
Response Example
{
"success": true,
"player": "Steve"
}
cURL
curl -X POST 'http://localhost:5550/api/players/Eranio/op' \
-H 'X-Admin-Token: YOUR_TOKEN'
Internal Behavior
/api/players/{name}/deop
Revoke OP
Removes operator rights from the player.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
name
|
string | Yes | Player name |
Response Example
{
"success": true,
"player": "Steve"
}
cURL
curl -X POST 'http://localhost:5550/api/players/Eranio/deop' \
-H 'X-Admin-Token: YOUR_TOKEN'
Internal Behavior
/api/players/{name}/teleport
Teleport player
Teleports the player to coordinates in their current world.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
name
|
string | Yes | Player name |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
x
|
number | Yes | Target X |
y
|
number | Yes | Target Y |
z
|
number | Yes | Target Z |
Response Example
{
"success": true,
"player": "Steve",
"x": 10.0,
"y": 64.0,
"z": -3.0
}
cURL
curl -X POST 'http://localhost:5550/api/players/Eranio/teleport' \
-H 'X-Admin-Token: YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"x": 120.5, "y": 80, "z": -45.5}'
Internal Behavior
/api/players/{name}/give
Give item
Adds an item to the inventory, hotbar first.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
name
|
string | Yes | Player name |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
item
|
string | Yes | Item ID (alias itemId) |
amount
|
integer | No | Amount 1 to 999, default 1 (alias quantity) |
Response Example
{
"success": true,
"item": "hytale:sword_iron",
"amount": 1
}
cURL
curl -X POST 'http://localhost:5550/api/players/Eranio/give' \
-H 'X-Admin-Token: YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"item": "Weapon_Sword_Iron", "amount": 1}'
Internal Behavior
/api/players/{name}/heal
Heal player
Restores the player to full health.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
name
|
string | Yes | Player name |
Response Example
{
"success": true,
"player": "Steve"
}
cURL
curl -X POST 'http://localhost:5550/api/players/Eranio/heal' \
-H 'X-Admin-Token: YOUR_TOKEN'
Internal Behavior
/api/players/{name}/gamemode
Set game mode
Switches the player between Adventure and Creative.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
name
|
string | Yes | Player name |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
gamemode
|
string | Yes | adventure or creative |
Response Example
{
"success": true,
"gamemode": "creative"
}
cURL
curl -X POST 'http://localhost:5550/api/players/Eranio/gamemode' \
-H 'X-Admin-Token: YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"gamemode": "creative"}'
Internal Behavior
/api/players/{name}/inventory/clear
Clear inventory
Empties hotbar, storage, armor, utility, backpack and tools.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
name
|
string | Yes | Player name |
Response Example
{
"success": true,
"player": "Steve"
}
cURL
curl -X POST 'http://localhost:5550/api/players/Eranio/inventory/clear' \
-H 'X-Admin-Token: YOUR_TOKEN'
Internal Behavior
/api/players/{name}/inventory/slot
Set slot
Places an item into a specific slot and replaces what was there.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
name
|
string | Yes | Player name |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
item
|
string | Yes | Item ID (alias itemId) |
amount
|
integer | No | Amount 1 to 999, default 1 |
section
|
string | No | hotbar, storage, armor, utility, backpack or tools, default storage |
slot
|
integer | No | Slot index, default 0 |
Response Example
{
"success": true,
"item": "hytale:sword_iron",
"amount": 1
}
cURL
curl -X POST 'http://localhost:5550/api/players/Eranio/inventory/slot' \
-H 'X-Admin-Token: YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"item": "Food_Bread", "amount": 16, "section": "hotbar", "slot": 2}'
Internal Behavior
/api/players/{name}/inventory/slot/remove
Clear slot
Removes the item from one slot.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
name
|
string | Yes | Player name |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
section
|
string | No | Container, default storage |
slot
|
integer | No | Slot index, default 0 |
Response Example
{
"success": true,
"section": "storage",
"slot": 0
}
cURL
curl -X POST 'http://localhost:5550/api/players/Eranio/inventory/slot/remove' \
-H 'X-Admin-Token: YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"section": "storage", "slot": 5}'
Internal Behavior
/api/players/{name}/inventory/slot/swap
Swap slots
Swaps two slots, also between containers (for example storage and hotbar).
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
name
|
string | Yes | Player name |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
fromSection
|
string | No | Source container, default storage |
fromSlot
|
integer | No | Source slot, default 0 |
toSection
|
string | No | Target container, default storage |
toSlot
|
integer | No | Target slot, default 0 |
Response Example
{
"success": true
}
cURL
curl -X POST 'http://localhost:5550/api/players/Eranio/inventory/slot/swap' \
-H 'X-Admin-Token: YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"fromSection": "storage", "fromSlot": 3, "toSection": "hotbar", "toSlot": 0}'