# Introduction
Welcome to the uShop documentation page. This guide will assist you in setting up your item sale shop.

This plugin offers a fancy way of selling items to the server. Unlike the default `/sell` command of Essentials, uShop provides a nice GUI which displays the current worths of any item that were put in the GUI.
uShop is a must-have for every survival and skyblock server!

# Features
* Bulk sell items
* All items are supported, including enchanted items, items with lore, displayname and so on.
* Customizable GUI
* Ability to add Flags, so you can ignore certain item meta values like enchantments.
* Built-in Essentialsx worth converter

# Installation
1. Download this Plugin and Vault
2. Place those plugins in your plugin folder
3. Reload/Restart your server
4. Use the shop with /sell


# Configuration
## Adding new Items

There are two ways of setting a price on your items; either by altering the `sell-prices-simple` item list in your config.yml, or by using the command. Both methods are explained below.

Your players can access the shop by typing `/sell` (configurable)

### Simple prices

Simple prices are saved in the format `MATERIALNAME:PRICE`. Initially, they're all set to zero. Altering this prices will have no effect on meta data values (enchantments, lore, displayname) etc, but it give you a simple opportunity to set prices.

### Using the command

You can set a price on any item in game by using this command:

`/ushop add <price> [Flags ...]`

This command works on items with and without item meta. There are several flags that can be used:

`ignore_enchantments, ignore_durability, ignore_lore, ignore_displayname, ignore_meta`

You can append any of them to the command in order to ignore certain meta data values, so you can make sure that your players are able to sell randomized stuff (like diamond swords with different enchantments) for a base price.

## Converting from EssentialsX worth list

If you have already set up your EssentialsX worth list, you might want to use it for uShop. This is done by typing this simple command:

`/ushop convert`

It will convert all prices inside the `plugins/Essentials/worth.yml` file to uShop.

# Commands
### User commands
`/sell` - opens the shop GUI, can be configured.
Permission: ushop.use

### Admin commands
`/ushop reload` - reloads the config

`/ushop add <price> [flags ...]` - sets a custom price for an item with custom lore, displayname, durability and enchants

`/ushop open <player>` - opens the shop for other players

`/ushop convert` - converts the essentials worth list
Permission: ushop.admin

# Misc

## Open the Shop using a sign

You might want to open the Shop for player using a command sign plugin or by a NPC. This can be done by running this command in the console (via your desired plugin):

`/ushop open <player>`

## Default config.yml

```yml
gui-name: "&cShop"
gui-rows: 5
gui-sellitem:
  material: "EMERALD"
  displayname: "&cClick to Sell (&a%total%&c)"
gui-item-enumeration-format: "%amount%x &c%material%&r = &a %price%"
message-sold: "&aSold all items for &c%total%&a!" 
command: "sell"
# sell prices. I suggest to use /ushop setprice in game for adding items, or use /ushop convert in order to use your essentialsx prices!

# [... sell prices here]
```



