Open Zartec opened 8 years ago
Nice work, I'll review this, test it, and merge :+1:
@Zartec Looking over this it seems like you made it so all shops are both buy
and sell
shops. What if users want to make a buy shop, or a sell shop, but not both?
This is possible over:
/spongychest setshop 100 -> sell shop
/spongychest -s 100 -> sell shop
/spongychest -sell-shop=100 -> sell shop
/spongychest -b 100 -> buy shop
/spongychest -buy-shop=100 -> buy shop
If the sell price is 0
the shop is not selling anything. Same for the buy price.
Reverted the dataquery key to the previous PriceChest
for selling shops and added converter to the datamanipulator
Allows players to create shops on which items can be sold and bought. Also shops which only sells or only buys are possible.
Also the inventories of the chest and the player are checked for free space, because sponge inserts the items to the armor slots if there is no more space.
Left click sells items if you are not the owner and you don`t have the destroy permission
The command is changed to:
[] -> required
<> -> optional
/spongychest setshop [sellprice] <[buyprice]>
/spongychest setshop <-s sellprice> <-b buyprice>
/spongychest setshop <--sell-price=sellprice> <--buy-price=buyprice>