# Player Shop

## About

Player Shops are shops owned by individual players. Player Shops depend on the owner's money, and it's own storage. Player Shops can be [rented](https://vebjorn-elvekrok.gitbook.io/villager-market/renting-shops), bought or placed, and have some additional features such as quick-add and limit for bying items.

## Creating a Player Shop

There are two ways to create a new Player Shop:

1. By command
2. By placing a Villager Shop spawn egg

### Creating a Player Shop by command

```
/vm create player <shopsize> <storagesize> <price> [time]
```

{% hint style="info" %}
Click [here](https://vebjorn-elvekrok.gitbook.io/villager-market/commands-and-permissions#create-villager-shop) for more details
{% endhint %}

### Creating a Player Shop from a Villager Shop egg

You can also create a new Player Shop by placing a Villager Shop spawn egg. To obtain such item, use the following command:

```
/vm item give <player> <shopsize> <storagesize> [amount]
```

{% hint style="info" %}
Click[ here](https://vebjorn-elvekrok.gitbook.io/villager-market/commands-and-permissions#give-shop-spawn-egg) for more details
{% endhint %}

## Storage

Every Player Shop has a storage. To open your storage, click on the chest in the edit shop menu. The storage works like a normal minecraft chest, and you can add and remove any items from it. The storage serves two purposes:

1. Items you sell in your shop will be withdrawn from the storage
2. Items your customers sell to your shop will end up in the storage

### Amount left to buy

When setting an item so `BUY` mode, customers can sell the items to your shop. Since these items end up in your storage, the amount you can buy is based on:

1. Available space in your storage
2. Your balance (if you don't have any money, you can't buy items from your customers)
3. The optional set buy limit ([Set buy limit](https://vebjorn-elvekrok.gitbook.io/villager-market/edit-shop/shop-front#set-buy-limit))

## Buy, sell/abondon a Player Shop

If a Player Shop was created by command, anyone can buy it (unless "buy\_shop\_permission is enabled in the config, which then requires[ villagermarke&#x74;*.*&#x62;uy\_shops](https://vebjorn-elvekrok.gitbook.io/villager-market/commands-and-permissions#buy-shop)). The money required is specified when the Shop is initially created, and can not be changed later on. After purchasing a shop, you're the sole owner of it.&#x20;

When you own a shop, you can choose to abondon it. If you bought the shop, you may get refunded a certain percentage of the initial price. This can be configured in the config.yml.&#x20;

All remaining items in the storage will also be given to the owner (even if offline), and the shop is now available for purchase again!

{% hint style="info" %}
You can limit the amount of player shops a player can buy using [this ](https://vebjorn-elvekrok.gitbook.io/villager-market/commands-and-permissions#max-shops)permission node
{% endhint %}

{% hint style="info" %}
If the Shop was created using a Villager Shop spawn egg, you will not get refunded and the Villager Shop will be removed forever
{% endhint %}
