Skip to content
Getting Started

Getting Started

Overview

XShop is the server's own shop, built on XCore: players buy from it and sell to it, through menus and commands, where XAuctionHouse lets them trade with each other. Every shop is a file you can edit by hand, in game or on XCore's dashboard, and an audit tells you wherever the shop would pay out more than it takes in.

Key features

  • Shops as files: one YAML file per shop in plugins/XShop/shops/. A product is an item of the game, one exact item captured from your hand, console commands, or a spawner
  • Buying: a quantity screen with the total shown live, quick clicks you choose, and XCore's delivery for whatever no longer fits
  • Selling: /sell, /sell hand, /sell all, /worth and sell wands. A renamed, enchanted or plugin-made item is never swept up by mistake
  • Prices: price groups by permission, boosters for one player, sales for everyone, and dynamic prices that follow demand between bounds you set
  • A guarantee: no sale pays more than the lowest price the same item can be bought for, so buying and selling back never pays
  • Stock and limits: fixed stock with restocks, stock filled by what players sell, limits per player per day, week or month, and a rotating shop of daily offers
  • Audit: the loops through crafting, smelting, stonecutting and smithing that would print money, with the route spelled out
  • Dashboard: the shops as grids with the real item icons, every trade, the market, the stocks, the events, the audit and the history of every change
  • Imports: from ShopGUI+, EconomyShopGUI and the worth.yml of Essentials
  • Network: prices, stocks, limits, boosters and sales shared across servers, and decided by the database
  • Bedrock: forms instead of chest menus, through Floodgate
  • Developer API: read what an item is worth, trade for a player, listen to every trade

Requirements

  • Paper 1.21.1+, or Folia
  • Java 21+
  • XCore 2.1+ installed as a plugin. XShop does not start on an older XCore: update XCore first, in the same restart
  • An economy: XCore's own currencies, or any economy registered with Vault (EssentialsX, CMI…). Without one, the shops load but nothing can be bought or sold
  • Vault: optional, only needed when the economy is another plugin's
  • PlaceholderAPI: optional, for the placeholders
  • Floodgate: optional, so that Bedrock players get forms

Installation

  1. Install XCore 2.1 or later in your server's plugins/ folder.
  2. Place XShop.jar in plugins/ too, next to XCore.
  3. Start the server. XShop creates plugins/XShop/ with its config.yml, its language files, its menus in guis/ and the eleven starter shops in shops/.
  4. Join and run /shop: the shops are open.
  5. Change what you like in config.yml or in the shop files, then run /xshop reload.

XShop keeps its trades, stocks, limits and history in XCore's database, in tables of its own created on the first start. There is nothing to connect: the money goes through XCore, which reaches another plugin's economy through Vault when that is the one your server uses.

The First Start

The starter shops are copied once, when plugins/XShop/shops/ does not exist yet, in the plugin's language: the language key of XShop's own config.yml, else XCore's. The jar carries them in English and in French; any other language gets the English ones. A shop's name and description are text of its file, which no language file translates afterwards. An update never adds a shop to the folder, and a shop you delete stays deleted.

The console then says what it read:

The starter shops were copied to the shops folder.
Loaded 11 shop(s), 549 product(s).

Two other lines are worth looking for:

  • No economy: This server has no economy: enable XCore's (economy.enabled in its config.yml) or install Vault with an economy plugin. Nothing can be bought or sold until then.
  • XCore too old: XShop requires XCore 2.1 or newer, and this server runs XCore 2.0.1. Update XCore first: the shop stays closed until then.

A line of a shop file that cannot be used is named in the console with the reason, and the rest of the shop opens. /xshop audit lists them again.

The Starter Shops

Eleven shops and 549 products, ready to open:

FileShopProductsWhat is in it
blocks.ymlBlocks81Stone, earth, sand and what is made of them
wood.ymlWood68Logs, planks and saplings
colors.ymlColours112Wool, concrete, terracotta, glass and dyes
decoration.ymlDecoration69Flowers, lights and furniture
farming.ymlFarming37Seeds, crops and what grows on a farm
food.ymlFood28Everything a hungry player could ask for
ores.ymlOres and minerals30Ingots, gems and their blocks
mobs.ymlMob drops42What mobs leave behind, and ten spawners
redstone.ymlRedstone27Everything a machine needs
tools.ymlEquipment35Tools, weapons and armour
deals.ymlDaily deals20A rotating shop: five rare items a day, a fifth off, a few of each

Their prices come from about a hundred base prices carried through the game's recipes: buying the ingredients and crafting costs about 15% less than buying the item, and the shop buys everything back for a quarter of its price. They pass the audit as they come.

  • The 72 products players gather in bulk (stone, sand, logs, crops, raw meat and fish, ores, mob drops) have dynamic prices that move by up to 20%
  • Each spawner can be bought twice a day per player
  • Daily deals only sells: nothing there is bought back

They are a starting point: change them, delete them, or replace them with an import.

Opening the Shop

/shop                  # the list of shops
/shop ores             # one shop, by its file name
/shop search diamond   # every product whose name holds the words

The list of shops

Every shop the player may open, each at the place its file gives it (slot:) and the others in the free places in the order of their file names, with a second page when there are more. A shop whose permission the player lacks, or that is hidden, is left out; one that is closed in this world is shown, with why. Around them: the player's balance in every currency the shops use, a button that opens the sell chest, and a search button.

In a shop

The products, page by page, each with its price to buy and to sell, what is left in stock, what is left of the player's limits and what each click does. Under them: the sell button, the page arrows, the way back to the list, and an item with the player's balances, the countdown of a rotating shop and the sales running.

By default a left click opens the quantity screen, a right click sells one lot, shift and left click buys a stack, and shift and right click sells every unit of the product the player carries. Quick Clicks says how to change that.

The search button of the list opens an anvil holding a sheet of paper: the player renames it with what they look for and takes the result. The results page lists the products of every shop they may open whose id, item or name holds every word typed, with a New search button; closing the anvil without searching goes back to the list. /shop search <text> does the same in one line. Item names are matched in English, from the item ids, and a rotating shop only shows its offers of the moment.

Bedrock players get the same shops as forms, through Floodgate: see Bedrock Players.