Color theme

Adventure

Base: /api/adventure

Hytale 0.7: world events, portals, void invasions, instances and player tools

Handler: AdventureHandler
GET /api/adventure

Adventure overview

Returns every loaded world (permanent or instance) with world events, spawn, portal state, void invasion stages and players with size, teleport history, wilderness map and debug lock; also the instance templates.

Response Example

{
  "worlds": [
    {
      "name": "default",
      "available": true,
      "instance": false,
      "ticking": true,
      "world_events": true,
      "spawn": {
        "x": 0.0,
        "y": 64.0,
        "z": 0.0
      },
      "portal": null,
      "players": [
        {
          "name": "Steve",
          "debug_screens_blocked": false,
          "scale": 1.0,
          "history_back": 0,
          "history_forward": 0,
          "wilderness_debug": false,
          "x": 10.0,
          "y": 64.0,
          "z": -3.0
        }
      ]
    }
  ],
  "instance_templates": [
    "Dungeon_Small",
    "Dungeon_Large"
  ]
}

cURL

curl -X GET 'http://localhost:5550/api/adventure' \
  -H 'X-Admin-Token: YOUR_TOKEN'

Internal Behavior

Runs one task per world on its world thread. Void stages are read from the configuration of each portal.
POST /api/adventure/world-events

World events on/off

Turns Hytale's world events (for example goblin raids) on or off for one world.

Request Body

Field Type Required Description
world string No World name, default first loaded world
enabled boolean Yes Turn world events on or off

Response Example

{
  "success": true,
  "world": "default",
  "world_events": true
}

cURL

curl -X POST 'http://localhost:5550/api/adventure/world-events' \
  -H 'X-Admin-Token: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"world": "default", "enabled": false}'

Internal Behavior

Changes WorldEventsWorldConfig and starts or stops the running events.
POST /api/adventure/portal/time

Change portal time

Changes the remaining time of a portal world, between 10 seconds and 6 hours.

Request Body

Field Type Required Description
world string No Portal world, default first loaded world
seconds integer Yes Seconds to add (negative removes) or to set
mode string No add (default) or set

Response Example

{
  "success": true,
  "world": "default",
  "remaining_seconds": 3600
}

cURL

curl -X POST 'http://localhost:5550/api/adventure/portal/time' \
  -H 'X-Admin-Token: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"world": "instance-portal_hedera-1", "seconds": 300}'

Internal Behavior

Sets the remaining seconds of PortalWorld; rebuilds a due void invasion right away or keeps a stopped one stopped.
POST /api/adventure/portal/timer

Pause or resume portal timer

Toggles the time limit of a portal world.

Request Body

Field Type Required Description
world string No Portal world

Response Example

{
  "success": true,
  "world": "default",
  "timer_active": false
}

cURL

curl -X POST 'http://localhost:5550/api/adventure/portal/timer' \
  -H 'X-Admin-Token: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"world": "instance-portal_hedera-1"}'

Internal Behavior

Calls PortalWorld.toggleTimeLimit on the world thread.
POST /api/adventure/portal/void

Stop or allow void invasion

stop removes the invasion and holds its counter while the portal time keeps running; allow resets the plan.

Request Body

Field Type Required Description
world string No Portal world
action string Yes stop or allow

Response Example

{
  "success": true,
  "world": "default",
  "action": "stop"
}

cURL

curl -X POST 'http://localhost:5550/api/adventure/portal/void' \
  -H 'X-Admin-Token: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"world": "instance-portal_hedera-1", "action": "stop"}'

Internal Behavior

Removes the VoidEvent entity and pauses its resource, or clears the stop flag and restarts the stage plan if due.
POST /api/adventure/debug-screens

Lock debug screen

Locks or unlocks the debug screen (F3) for a player.

Request Body

Field Type Required Description
player string Yes Online player
blocked boolean Yes Lock the debug screen (F3)

Response Example

{
  "success": true,
  "player": "Steve",
  "debug_screens_blocked": true
}

cURL

curl -X POST 'http://localhost:5550/api/adventure/debug-screens' \
  -H 'X-Admin-Token: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"player": "Eranio", "blocked": true}'

Internal Behavior

Adds or removes the PreventDebugScreens component.
POST /api/adventure/teleport-player

Teleport to player

Teleports a player to another player, also across worlds.

Request Body

Field Type Required Description
player string Yes Player to move
target string Yes Player to teleport to

Response Example

{
  "success": true,
  "player": "Steve",
  "target": "Alex",
  "world": "default"
}

cURL

curl -X POST 'http://localhost:5550/api/adventure/teleport-player' \
  -H 'X-Admin-Token: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"player": "Eranio", "target": "Kim"}'

Internal Behavior

Reads the target position on its world thread and writes a teleport history entry.
POST /api/adventure/spawn

Set spawn

Sets the spawn point of a world at a player's position or at coordinates.

Request Body

Field Type Required Description
player string No Use this player's position as spawn
world string No World for coordinates
x number No Required without player
y number No Required without player
z number No Required without player

Response Example

{
  "success": true,
  "world": "default",
  "x": 10.0,
  "y": 64.0,
  "z": -3.0
}

cURL

curl -X POST 'http://localhost:5550/api/adventure/spawn' \
  -H 'X-Admin-Token: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"world": "default", "x": -398.5, "y": 115, "z": -98.5}'

Internal Behavior

Sets a GlobalSpawnProvider in the world config.
POST /api/adventure/send-to-spawn

Send to spawn

Sends a player to the spawn of a world.

Request Body

Field Type Required Description
player string Yes Online player
world string No Target world, default the player's world

Response Example

{
  "success": true,
  "player": "Steve",
  "world": "default"
}

cURL

curl -X POST 'http://localhost:5550/api/adventure/send-to-spawn' \
  -H 'X-Admin-Token: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"player": "Eranio"}'

Internal Behavior

Teleports to the spawn point and writes the teleport history.
POST /api/adventure/scale

Set player size

Scales a player between 25 and 400 %.

Request Body

Field Type Required Description
player string Yes Online player
scale number Yes Size factor 0.25 to 4.0

Response Example

{
  "success": true,
  "player": "Steve",
  "scale": 1.5
}

cURL

curl -X POST 'http://localhost:5550/api/adventure/scale' \
  -H 'X-Admin-Token: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"player": "Eranio", "scale": 2.0}'

Internal Behavior

Sets the EntityScaleComponent.
POST /api/adventure/history

Teleport history

Moves a player one step back or forward in the teleport history (like /back).

Request Body

Field Type Required Description
player string Yes Online player
direction string No back (default) or forward

Response Example

{
  "player": "Steve",
  "direction": "back",
  "success": true
}

cURL

curl -X POST 'http://localhost:5550/api/adventure/history' \
  -H 'X-Admin-Token: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"player": "Eranio", "direction": "back"}'

Internal Behavior

Calls TeleportHistory.back or forward.
POST /api/adventure/wilderness

Wilderness map

Shows or hides the wilderness debug map for a player.

Request Body

Field Type Required Description
player string Yes Online player
enabled boolean Yes Wilderness map on or off

Response Example

{
  "success": true,
  "player": "Steve",
  "wilderness_debug": true
}

cURL

curl -X POST 'http://localhost:5550/api/adventure/wilderness' \
  -H 'X-Admin-Token: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"player": "Eranio", "enabled": true}'

Internal Behavior

Adds or removes WildernessDebug and clears the tinted map chunks when turned off.
POST /api/adventure/instance/spawn

Open instance

Opens a new instance from a template and sends the player in. On leaving the player returns to the old position.

Request Body

Field Type Required Description
template string Yes Instance template (see instance_templates in the overview)
player string Yes Online player

Response Example

{
  "success": true,
  "player": "Steve",
  "template": "Dungeon_Small"
}

cURL

curl -X POST 'http://localhost:5550/api/adventure/instance/spawn' \
  -H 'X-Admin-Token: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"template": "Portals/Portals_Hedera", "player": "Eranio"}'

Internal Behavior

Calls InstancesPlugin.spawnInstance.
POST /api/adventure/instance/exit

Leave instance

Brings a player out of an instance back to the previous world.

Request Body

Field Type Required Description
player string Yes Player inside an instance

Response Example

{
  "success": true,
  "player": "Steve",
  "world": "instance_abc123"
}

cURL

curl -X POST 'http://localhost:5550/api/adventure/instance/exit' \
  -H 'X-Admin-Token: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"player": "Eranio"}'

Internal Behavior

Calls InstancesPlugin.exitInstance.
POST /api/adventure/instance/close

Close instance

Closes an empty instance.

Request Body

Field Type Required Description
world string Yes Instance world

Response Example

{
  "success": true,
  "world": "instance_abc123"
}

cURL

curl -X POST 'http://localhost:5550/api/adventure/instance/close' \
  -H 'X-Admin-Token: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"world": "instance-portal_hedera-1"}'

Internal Behavior

Checks that nobody is inside, then calls InstancesPlugin.safeRemoveInstance.