Emberstore logoEmberstore

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.

A confirmed payment writes the reward to a waiting list in the database first. An online player gets it straight away. An offline player gets it when they next join.

How it works

  1. A payment is confirmed, an item is given with /store admin give, a refund needs a take-back, or a subscription renews.
  2. The reward is saved in the database as waiting for that player.
  3. If the player is online, it runs straight away on the main server thread and they get the message.
  4. If not, it waits. When they join, everything waiting for them runs.
In chat: the sale announcement and the buyer's Your purchase has been delivered message.

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
KeyDefaultWhat it does
enabledtrueHold 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-jointrueSend 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.

On this page