Sleep Action
Causes the player to sleep, skipping the night or day if specified.
Type ID: lunali:sleep
| Field | Type | Default | Description |
|---|---|---|---|
sleep_during_day |
Boolean | false | If the player is allowed to sleep during the day. |
sleep_during_night |
Boolean | true | If the player is allowed to sleep at night. |
set_spawnpoint |
Boolean | true | If sleeping sets your spawnpoint. |
skip_weather |
Boolean | true | If sleeping skips weather upon waking up |
fail_message |
String | You can't sleep right now. | The fail message to send to the player. |
Note
You should probably use origins:prevent_sleep if you want to prevent the player from sleeping with beds. Do also note that beds do not work for daytime, even if sleep_during_day is true.
Examples
"sleep": {
"type": "origins:active_self",
"key": "key.origins.primary_active",
"cooldown": 0,
"entity_action": {
"type": "lunali:sleep",
"sleep_during_day": true,
"sleep_during_night": false,
"skip_weather": true,
"fail_message": "You are not tired.",
"set_spawnpoint": true
}
}
This example will cause the player to fall asleep without a bed during the daytime & skip weather when waking up. If the player attempts to sleep at night the message "You are not tired." will appear. also sets the player spawnpoint.