Origins: Powerful Powers
» Entity actions » Action on disconnect

Action on disconnect

origins-powerful-powers:action_on_disconnectpower type

Runs actions while the holder leaves the server, before their data is saved, so variable changes made here are kept. Players only.

FieldTypeDefaultDescription
entity_actionEntity actionoptionalRuns on the holder.

Example: clears a casting variable as the player leaves, so it's saved as false.

json
{
  "type": "origins-powerful-powers:action_on_disconnect",
  "entity_action": {
    "type": "origins-powerful-powers:execute",
    "code": "casting = false;"
  }
}