Origins: Powerful Powers
» Entity actions » Action on sleep start

Action on sleep start

origins-powerful-powers:action_on_sleep_startpower type

Runs actions the moment the holder falls asleep, before the night is skipped. Players and villagers.

FieldTypeDefaultDescription
entity_actionEntity actionoptionalRuns on the holder.
  • A bed that's too far, a monster nearby, daytime, or an origins:prevent_sleep power stop it from firing.
  • Origins' origins:action_on_wake_up covers waking. To check "asleep right now", use is_sleeping.

Example: the holder heals 2 hearts as they fall asleep.

json
{
  "type": "origins-powerful-powers:action_on_sleep_start",
  "entity_action": {
    "type": "origins:heal",
    "amount": 4
  }
}