Offline Working
Choose whether minions keep working while their owner is offline, and for how long.
Minions can keep working after their owner logs out, so players come back to full storage. You choose whether that happens at all and how many hours it lasts, which keeps minions of players who quit the server from running forever.
The settings
Both keys live at the top level of config.yml.
offline-working: true
offline-max-hours: 12| Key | Shipped value | What it does |
|---|---|---|
offline-working | true | Whether minions keep working while their owner is offline |
offline-max-hours | 12 | How many hours they keep working after the owner leaves. 0 means no limit |
offline-max-hours only matters while offline-working is true. Changes apply after /minion reload.
What happens when the limit is reached
Minions check the rule each time they are about to act. Once the owner has been offline too long, or straight away when offline-working is false:
- The minion's status becomes Owner offline, from
status.owner-offlinein the language file. It shows in holograms, menus and the minion list. - It stops working and uses no fuel.
- A chunk loader lets go of its chunks, so they can unload.
Every minion type follows the rule, chunk loaders and chunk collectors included.
A minion that is in the middle of its delay finishes waiting first, so it can take up to one delay after the limit before the status changes.
How the time is counted
The clock starts when the owner logs out, and it survives restarts:
- The logout time is saved in the database when a player leaves.
- For players who are online, the time is also saved on every save, set by
performance.save-interval, and when the server stops. A crash or restart never resets the clock. - If the plugin has no saved time for an owner, it counts from when the server started.
When the owner comes back
When the owner joins, their minions that show Owner offline start again about a second later, as long as the chunk they stand in is loaded.
Minions whose chunk unloaded while the owner was away carry on the next time that chunk loads, for example when the owner walks back to them.
A chunk loader is a special case. When its owner joins, a loader that let go of its chunks holds them again straight away, even if its own chunk has unloaded, unless it is paused or out of fuel. This also covers loaders left out after a restart because their owner was past the limit. See Chunk loader.
Choosing values
| You want | Set |
|---|---|
| Minions only work while the owner plays | offline-working: false |
| A day's worth of offline work | offline-working: true, offline-max-hours: 24 |
| Minions that never stop | offline-working: true, offline-max-hours: 0 |
Minions that never stop also keep the chunks of every chunk loader loaded forever, even for players who have left the server for good. On a busy server, a limit is the safer choice.