Admin tools and reports
/mccs stats [days]: revenue per currency and your best sellers (default 7 days)./mccs history <player>: a player's 10 latest purchases with their purchase ids./mccs refund <id>: gives the currency back for a purchase. A purchase can only be refunded once. Items and commands are not undone, because the plugin cannot know how to./mccs resetall <currency>: resets every player to the starting balance. You must run it twice within 30 seconds to confirm. Built-in currencies only./mccs reload: reloads every file. Open menus close first so nobody buys from an old layout.
Webhook alerts#
discord.yml posts shop events to a chat webhook. Paste a URL into webhook-url (or give each event its own webhook-url), then set enabled: true on the events you want. All are off by default. Events: purchase, gift, sale-start, sale-end, restock, low-stock, out-of-stock, price-change, payments and admin-payments.
events:
purchase:
enabled: false
color: "#34D399"
title: "New purchase"
description:
- "**{player}** bought **{quantity}x {item}**"
- "Paid {price} {currency}"
gift:
Each event has a title, a description list and a color, and uses placeholders such as {player}, {item}, {quantity}, {price}, {currency}, {receiver}, {percentage}, {items}, {time}, {stock}, {old_price}, {new_price}, {sender}, {amount}, {tax} and {admin} as shown in the file.
Text and sounds#
messages.yml holds every message. Keys you delete fall back to the default. Colors: &a codes, &#RRGGBB hex and MiniMessage such as <gradient:#34D399:#8B5CF6> work in all text. Sounds are set under shop.sounds in config.yml.
Storage#
Data is stored in SQLite by default. Use MySQL if you want a database server. Purchases always save right away, and the rest saves every auto-save-interval minutes. All database work runs off the main thread.
storage:
# SQLITE needs no setup. Use MYSQL to keep the data on a database server.
type: SQLITE
# Minutes between saves. Purchases always save right away.
auto-save-interval: 5
mysql:
host: localhost
port: 3306
database: mccoinshop
username: root
password: password
use-ssl: false
table-prefix: mccs_
Developer API#
Other plugins can listen to ShopPurchaseEvent (can be cancelled, and the price can be changed) and ShopPostPurchaseEvent in com.technotypist.mccoinshop.api.