Offline delivery
How rewards wait for players who are offline when their payment is confirmed, and run when they join.
Players often close the game while they pay. Emberstore writes every reward to your database before running it, so a purchase confirmed while the player is away is waiting for them when they come back, even across restarts.
How it works
- A payment is confirmed, an item is given with
/store admin give, a refund needs a take-back, or a subscription renews. - The reward is saved in the database as waiting for that player.
- If the player is online, it runs straight away on the main server thread and they get the message.
- If not, it waits. When they join, everything waiting for them runs.
The same applies to take-backs after a refund, renewal reminders and the messages about gifts, renewals and cancelled subscriptions.
Settings
offline-delivery:
# Hold rewards for players who are offline when payment confirms
enabled: true
# Tell the player about delivered rewards when they join
notify-on-join: true| Key | Default | What it does |
|---|---|---|
enabled | true | Hold rewards until the player joins. With false, rewards run the moment the payment is confirmed, online or not. Only use that when every reward command works for offline players. |
notify-on-join | true | Send the delivery messages (for example "Your purchase of VIP Rank has been delivered.") for rewards that ran on join. With false the rewards still run, without the messages. |
On a network
With network mode, the waiting rewards are shared. Every network.sync-interval-seconds, and when a player joins, the server the player is on claims what is waiting for them and runs it there. A claim that was never finished is released after two minutes so another server can take it, and nothing runs twice.