Delivery in game
The CraftRank plugin you use for vote rewards also delivers store purchases. It fetches the commands of each paid order and runs them on your console.
Set it up
- Get the plugin and your API key on the Plugin & API page of your server. See The CraftRank plugin.
- Use version 1.7.0 or newer. Older versions can't deliver store purchases.
- Put the API key in its
config.ymland restart the server. - Open Settings → Delivery in Website & store. It should say Connected with the version and when the plugin was last seen.
- Press Send a test command. Your console should show
CraftRank Sites delivery workswithin a minute.
Store delivery is on by default. The plugin checks for new purchases every 20 seconds; change it in its config.yml:
store: enabled: true check-every-seconds: 20
Commands that wait for the player
Commands marked Only when online (or starting with *) wait until the player is on the server. They run on the plugin's next check after the player joins. Other commands run on the next check, even if the player is offline. An order shows Delivered when all its commands ran.
Global commands
To run something for every purchase, such as a thank-you message, open your store admin and go to General → Global commands. They run once per order, after the packages' own commands. Use {player}, {order} and {package}; for an order with several packages, {package} lists them all.
The delivery log
Delivery lists the latest commands with their status: Waiting, Run or Cancelled. Press Cancel to stop a waiting command, or Run again to send one again.
When something is not delivered
- Plugin not connected: check the version, the API key and that store delivery is on. Type
/craftrankin the console; the Website store line should say OK. - Command waits until online: the player has to join. The log shows waits until online under the command.
- Order held: an order that breaks one of your fraud rules waits in Orders → Held. Nothing is given until you press Approve.
- Order waits for payment: the provider's notice never arrived. Check the notification address in your provider's dashboard and the Last notices list on its page in Payments.
- Command ran but nothing happened: look for Store command failed in your console. Fix the command in the package, then press Run again, or give the package again with a manual payment.