Repository navigation
First steps
Three steps take you from a fresh install to a working token and the admin panel.
From the server itself, no token needed:
$ curl -s http://localhost:8110/api/v1/server
{"name":"Paper","brand":"Paper","minecraftVersion":"26.3","onlinePlayers":3,"maxPlayers":20,"tps":20.0,"mspt":6.21,…}http://localhost:8110/api/v1/docs lists every endpoint with its fields.
The first start put an admin token in plugins/WorldAPI/config.yml, under auth.tokens. Send it as a bearer token:
curl -X PATCH http://localhost:8110/api/v1/worlds/world \
-H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
-d '{"dayTime": 1000, "weather": "clear"}'For anything you hand out, make a smaller token in game: /worldapi token create site. Tokens and permissions explains the menu and the groups.
- In game, run
/worldapi admin. You get a code that works for 30 minutes. - Open the panel. Through an SSH tunnel (
ssh -L 8110:localhost:8110 you@your-server) that'shttp://localhost:8110/admin/; behind a proxy,https://<your-domain>/worldapi/admin/. - Choose “I have a code”, enter it, and pick a password of at least 10 characters. The account takes your player name and joins the
ownergroup.
From then on, sign in with your name and password. /worldapi alone opens a chest menu with all of this: WorldAPI's state, a panel code, tokens, accounts, groups, and a config reload.
Before you open port 8110 to anyone, read Reverse proxy: plain HTTP sends tokens and passwords in the open.
Next: Tokens and permissions.