Skip to main content
POST
/
effect
/
apply
apply a status effect to an entity
curl --request POST \
  --url http://localhost:3917/effect/apply \
  --header 'Content-Type: application/json' \
  --data '
{
  "duration": 4,
  "entity_id": 5,
  "modifiers": [
    "move_speed:multiply:0.5"
  ],
  "source": 3,
  "stack_policy": "stack:3",
  "tag": "poison",
  "tick_effect": "dps:10"
}
'
{
  "message": "Applied effect 'poison' to entity 5 for 4s",
  "ok": true
}

Body

application/json

Apply a timed status effect: entity_id, tag, duration seconds (default 5). Optional modifiers are "stat:op:value" strings (op = set/add/multiply); stack_policy is replace or stack:N; tick_effect is dps:N, hps:N, or custom:name; source is the applying entity id.

The body is of type any.

Response

200 - application/json

Effect applied; ok is false with an error field if the entity is not found.