World

Base: /api/world

Retrieve world information, control weather and time, save world

Handler: WorldHandler
GET /api/world

World Info

General information about the current world.

Response Example

{"name":"overworld","seed":123456789,"time":6000,"weather":"clear","difficulty":"normal","spawn":{"x":0,"y":64,"z":0}}

cURL

curl http://localhost:5550/api/world
POST /api/world/time

Set Time

Sets the time of day for the world.

Request Body

Field Type Required Description
time integer Yes Ticks (0=Morning, 6000=Noon, 12000=Sunset, 18000=Night)

Response Example

{"success":true,"message":"Time set to 6000"}

cURL

curl -X POST http://localhost:5550/api/world/time \
  -H 'Content-Type: application/json' \
  -d '{"time":6000}'
POST /api/world/weather

Set Weather

Changes the weather of the world.

Request Body

Field Type Required Description
weather string Yes Weather: clear, rain, storm

Response Example

{"success":true,"message":"Weather set to clear"}

cURL

curl -X POST http://localhost:5550/api/world/weather \
  -H 'Content-Type: application/json' \
  -d '{"weather":"clear"}'
POST /api/world/save

Save World

Saves the current world to disk.

Response Example

{"success":true,"message":"World save initiated"}

cURL

curl -X POST http://localhost:5550/api/world/save

Internal Behavior

Save runs asynchronously. May briefly affect TPS.