Skip to content

Getting Started

CubBossa edited this page Jan 2, 2022 · 17 revisions

StatShops may be a bit confusing to new administrators. Therefore this page will help you to understand the main principles and how to manage your shops, discounts and limits.

If you haven't installed StatShops yet, check out this site first: (Install StatShops)[]

First of all: /statshops or likewise /statshops editor will be your command of commands to manage statshops. The command will open an editor that helps you to setup every shop, shop entry, discount or limit.

Shops

Of course, this plugins purpose is to create multiple shops and allow users to interact with them. It is important to understand that a shop is not a Villager with a custom GUI that opens when right clicking it. The shops you create are only the GUI. You can open them via command (/shops open <flatname>) or bind them to a Citizens NPC as a trait to open it with a right click. To create a shop you can run /shops editor and select the "Shops" icon. On the bottom right you can find a button to create a new Shop. If there is only one shop type provided (chest inventory based shop as default) you will be asked for a name in the Kyori MiniMessage format directly. Otherwise you first have to pick a shop type (there might be villager gui based shops in future updates). Now your shop is successfully created. Click on its icon in the shops list menu and the editor will open a new menu with settings for your shop. Here you can provide permissions, a display icon, change the name and open the shop entry editor where you can setup the items that players are supposed to trade.

Tags (Apply Limits and Discounts)

You might have seen already that discounts and limits are separate objects just like shops. Discounts will lower the buy price and raise the sell price for all items they are applied to. Limits restrict trading with a certain value until their cooldown has expired for all items they are applied to. To apply limits and discounts to shops and shop entries, StatShops provides a tag system. Each object can have as many tags (simple Strings like hashtags on instagram) as they want. If a shop entry or its shop have at least one common tag with a limit or a discount, the limit or discount will be applied to the according shop entry. The UUID of the shop/shop entry serve as tag by default, which allows you to use the "Apply Discount" option in the editor to directly add the shops/shop entries UUID to discount tags.

Lets say you want a Christmas discount for some of your shop items. Therefore, you would simply create a discount in the discount section of the editor and add the tag "christmas". Now, add the tag "christmas" to all shops if you want to discount all shop items from this shop or to single shop items if you want to only discount them.

Setup Shop Entries (Shop Items)

Every Shop has a list of shop entries, that will be rendered in the GUI once the shop will be opened. This includes simple static entries that do nothing at all (black glass panes in image), the "Previous Page" and "Next Page" buttons (player heads in image) and trade items (emerald in image). To edit entries, open the shop menu and click on "Setup Shop Entries". A Menu similar to your shop will open with additional buttons in the highest row of your player inventory.

To navigate pages and change the page title you have to use the buttons in the bottom row. In the center of the bottom row is a "Freeze" button (gray/green dye). Once is is toggled green, you can move items from your inventory into the shop and sort them in the way you like. If you are happy with the result, click Freeze again and all the items are converted into shop entries. Now you can click each item to open its "Shop Entry Editor" and modify some entry specific values (Permission for each entry, Tags, ...). Also, you can click on the Button that says "Static" that is set by default and pick one of the provided Entry Modules. Each module will perform its action when the customer interacts:

  • Static: does nothing
  • Previous Page: turns x pages up. Once selected, you can provide the amount.
  • Next Page: turns x pages down.
  • Exact Page: opens an exact shop page.
  • Close Shop: closes the shop GUI.
  • Open Shop: opens another shop GUI. -> You can make a main menu shop and link all subcategories.
  • Trade Item: trades an item -> might be used the most
  • Trade ...: one Trade Module for each Article Type (Item, Command, Console Command and all article types provided by other plugins) . Other: provided by other plugins

Tipp: use /statshops parse-chest <shop> [<page>] to convert any container (Chest, Double Chest, Shulkerbox, Furnace, Dispenser) from your world into a shop. It will add all items from the container to the shop. If the container is a Duspenser for example, slot 8 will be in row 3. The shop GUI will still be a chest based GUI so 9 possible items of the dispenser will be represented in the first line (9 slots) of the shops GUI. Parsing shops with e.g. a dispenser GUI might come in future updates.

Clone this wiki locally