MCMarket
MCMarket is a chest-menu shop for your server. Players buy and sell items with a click, paying in any MCEconomy currency, and admins build each shop by dragging items into an in-game editor.
Highlights
Shopping in a market
A player opens a market by typing the market command followed by the market's name, and can add a page number to jump straight to that page.
Browse
The market opens as a large chest. The top five rows show up to 45 items, each with its buy price, sell price, and currency written underneath. A side that is switched off shows as not available.
Left click to buy
You need at least one empty inventory slot. The price comes out of your current character's wallet and the item goes into your inventory.
Right click to sell
You need the item in your inventory. It is taken, and the sell price is paid to your current character. If the payment fails, the item is given back.
Turn pages
Arrow heads in the bottom row lead to the previous and next pages when they exist.
Money always belongs to the MCIdentity character a player is using. A player with no active character is asked to choose one first. Another plugin can also block a purchase or sale, and the player is told when that happens.
Building a market
Admins create a new market with the create option of the market command and change an existing one with the edit option. Both open the same editor.
| In the editor | What it does |
|---|---|
| Drag an item into the top rows | Adds it to the market, exactly as it is, including the stack size. |
| Shift and left click an item | Asks for the buy price in chat. |
| Shift and right click an item | Asks for the sell price in chat. |
| Middle click an item | Moves the item to the next MCEconomy currency. |
| Save and Reload head | Saves the page and refreshes the editor. |
| Arrow heads | Save the page and move to the previous or next page. |
When you are asked for a price, type a whole number in chat. Typing minus one switches that side off, so an item can be buy only or sell only. Closing the editor also saves your changes. Every item in the editor shows its current prices and currency, plus a reminder of these controls.
Each market is saved as its own file in the plugin's folder, named after the market. On first start MCMarket creates an example Ore Market so you can see how one looks. The files can be edited by hand if you prefer, but the editor is the intended way.
Commands and permission
Setup and storage
MCMarket is a normal plugin that runs next to MCEconomy and MCIdentity. The server loads both of them before MCMarket.
- Install MCIdentity and MCEconomy first.
- Add the MCMarket plugin file and start the server once to create its settings file.
- Turn on the master switch in the settings file. A fresh install ships switched off and creates no data until you turn it on.
- Choose where market data is stored, then restart.
Local file default
A database file inside the plugin's folder. Nothing to set up.
MySQL, PostgreSQL, or MongoDB
A shared database, reached with its address and login, exactly as in MCEconomy.
Central server
Every saved market is also copied to the MCEconomy central server, so your network has one record of every shop. If the central server's address is left empty, MCMarket warns you and keeps markets on this server only.
If MCEconomy or MCIdentity is missing or not ready, MCMarket says so once and leaves trading switched off instead of breaking the server. The server needs Java 25.
Modules
MCMarket is built from these modules. Each page says what the module holds and, for a published one, how to depend on it.