Dashboard
Opening It
XShop's pages are in XCore's web dashboard, next to the other plugins'. /xcore dashboard gives each member of staff a link that signs them in as themselves, and they see and do there only what their in-game permissions allow: every page needs xcore.dashboard and xcore.dashboard.xshop, and each action the permission of the matching command. The dashboard itself, its address and its sessions are set up in XCore: see Web Dashboard.
Every change made there goes through the same paths as the commands: a product is edited by rewriting its shop file, with the version before kept in the history; an event is started in the same table as /xshop event; and the admin signed in is recorded as the author.
The Pages
Overview
The money taken in and paid out over the last 24 hours, the net, the number of trades and of customers, the net over seven days, and how many products and shops there are. Two charts, the net and the trades per day over the last 30 days, and the most bought and most sold products of the week. A filter picks the currency.
Shops
Each shop as a grid that looks like its menu, page by page, with every item's real icon, and one empty page more to add to. The slots of the bar are locked.
- A click on a product: Edit, Move (then click where it goes), Price curve and Reset the price for a dynamic one, Delete
- A click on an empty slot: Add a product there
- For the shop: Edit the shop (title, icon, currency, place in the list, permission, hidden) and Delete the shop
- New shop, and Change prices: every buy price, sell price or both of a shop by a percentage, more than -90 and up to +1000, buy prices rounded up and sell prices down. The file before stays in the history
The product form has the item, with a search by name and the icons, the buy and sell prices of a lot, the lot, the currency, a dynamic range in percent, a stock, the buying and selling limits and their period (written: daily, weekly, monthly, forever, or a duration such as 6h), the name shown, a permission, whether /sell all takes it, and for a command product its commands, one per line. An empty field means none: no price, unlimited, no limit. Writing or changing commands needs the console's trust (see below); sending a product's commands back unchanged does not.
Products
Every product of every shop in a table, with a search and a shop filter, 50 per page: Edit, Price curve, Delete, and Export CSV.
Transactions
Every trade: the player, the item with its tooltip (an exact item exactly as it was), bought or sold, the product, the quantity, the total, the server and the time. A search by player or product, filters on the type and the shop, 25 per page, and Export CSV.
Market
The dynamic products, with what they cost and pay right now, their change from the base, their range and their pressure. Price curve draws the price hour by hour; Reset the price puts it back to its base.
Stock
The products with a stock: what is left, the max, the next restock, and whether sales fill it. Set the stock and Restock.
Events
The sales and boosters running, started by staff or by the clock, with who started them. Stop ends one started by staff; Start an event takes a name, a duration (2h, 1d), a discount for the buy prices and a bonus for the sell prices in percent (a surcharge is refused), and a shop or all of them; Give a booster takes a player, a duration and the two changes.
Audit
The findings of the last run, with the icon of the item each one is about, and Run the audit again. See The Audit.
History
Every change to a shop file made from a command, the dashboard, an import or a restore, with its author and its time, filtered by shop. Restore this version puts the file back as it was before that change; a version that brings console commands back needs the console's trust.
Configuration
XCore's editor for config.yml. It refuses YAML that does not parse, the plugin reloads once the file is saved, and the webhook address reads <hidden>.
On a player's profile
XShop's part of a player's profile: the items they bought and sold, what they spent and earned in each currency, the booster they have running, and their last 20 trades.
Who May Do What
| Action | Permission |
|---|---|
| Add, edit, move or delete a product; create or edit a shop; change prices; restore a version | xshop.admin.edit or xshop.admin |
| Write or change a product's console commands; restore a version that brings commands back | xshop.admin, with xcore.dashboard.config and xcore.dashboard.config.save: the console's trust, since those commands run as the console |
| Delete a shop | xshop.admin |
| Save the configuration | xshop.admin, with xcore.dashboard.config and xcore.dashboard.config.save |
| Set a stock, restock, reset a price | xshop.admin.stock or xshop.admin |
| Start or stop an event, give a booster | xshop.admin.events or xshop.admin |
| Run the audit | xshop.admin.audit or xshop.admin |
| Page | Permission |
|---|---|
| Overview, Shops, Products, Market, Stock, Events | xcore.dashboard.xshop alone |
| Transactions and their export | xshop.admin.logs or xshop.admin |
| Audit | xshop.admin.audit or xshop.admin |
| History | xshop.admin.edit or xshop.admin |
| Configuration, to read it | xcore.dashboard.config |
| XShop on a player's profile | xshop.admin.logs or xshop.admin, and xcore.dashboard.players |
Every page also needs xcore.dashboard.xshop. A page a reader may not read is left out of their dashboard altogether, and a button they may not use is not drawn. Operators have every one of these permissions. All the nodes of the dashboard are in XCore's Dashboard Roles.