Chest Shops

Black0ut1 edited this page on 2018-10-27

Chest Shops allow players to buy or sell items in exchange for coins.

 

 

Commands

Usage

Open a shop chest to see what’s inside. A chest that wants you to buy things will read [shop] or [buy]. If it says [sell] instead, you are supposed to sell things to it. You always buy or sell whole slots of items. Each slot, with whatever stack size present, will cost the designated price.

All transactions are performed via shift click. To buy items from a chest, shift click them into your inventory. Each whole slot you take out of the chest costs the designated price. You have to buy the whole slot. You need to have enough money or it won’t work. The money will be taken from your account.

A sell chest will allow you to sell any of the items that are already in the chest to it. The way this works is that whatever quantity of that item is in one slot of the chest, will be bought for the designated price. If there are different stack sizes of the same item type in the chest, the first one counts, starting from the top left. Items sold to a chest will be split accordingly, so the item stacks end up with the stack size that is accepted by the chest. The money will be transfered from the chest owner’s account to yours.

Sell items to players

Looking at this from your customers’ perspectives, the sign should read “buy”, because that’s what they do: They buy things from your chest. Alternatively, it can say “shop”, since this is considered the default behavior of a shop chest.

Setup

  1. Put down a chest.
  2. Put a sign above the chest and write [shop] in the first line, and the price of your shopchest in the second line. Leave the other lines empty.
  3. Put items in the chest.

When every item in the chest has been sold, the price line on the sign changes to “SOLD OUT”.

Buy items from players

Once again, look at this from your customers’ perspectives to realize that this type of chest must say “sell”, because they get to sell things to it. This type of chest requires you to put at least one slot of whatever people can sell to you in the chest.

The chest buys exactly what it can find in any of its slots, including amount, damage and enchantments, from any player for the price that is written on the sign. Items that are put in by people selling to you will not stack with the other contents, as to not make any changes to the setup, corrupting your shop chest.

For example, if you put 12 apples in the first slot and write 5 as the price on the sign, any customer can sell 12 or a multiple of 12 apples to the chest and will get 5 coins per 12 apples. The chest will be filled with slots containing stacks of 12 apples each.

Setup

  1. Put down a chest.
  2. Put a sign above the chest and write [sell] in the first line and the price you are willing to buy the items for in the second. Leave the other lines empty.
  3. Put the items you want to be sold to the chest into it.

When the chest is full, the price on the sign will change to “SOLD OUT“.

Signless Chest Shops

Compact Chest Shops can also be created without using signs.

  1. Rename the chest in an anvil with the format [shoptype] price. “[sell] 10”, for example.
  2. Place the chest down. Optionally place another chest next to it to make a double chest.
  3. Put the items you want to sell or buy into the chest.
Creative
Features
General
Minigames