# PeoplesMenu
PeoplesMenu is a comprehensive player-based shop system for Spigot 1.21, allowing users to set up their own GUI-based shops for other players to browse and buy from.
## Features
- **Player-Based Shop System**: No server shops! Every player can be a shop owner.
- **GUI-Based Management**: Easily manage your shop, set items, and define prices through an intuitive graphical interface. No commands needed for pricing.
- **Global Shop Listing**: A central GUI (`/shop`) that lists all player-owned shops for easy browsing.
- **Automatic Transactions**: Seamlessly integrated with Vault, money is automatically transferred from buyer to seller upon purchase.
- **Persistent Storage**: All shop data is saved and persists through server restarts.
- **Configurable**: Customize messages, GUI titles, and plugin settings through the `config.yml` file.
## Dependencies
To run PeoplesMenu, you will need:
- **Spigot 1.21** or higher.
- **[Vault](
https://www.spigotmc.org/resources/vault.34315/)** (latest version).
- An **Economy Plugin** that hooks into Vault (e.g., EssentialsX, CMI, etc.).
## Installation
1. Download the latest `PeoplesMenu-1.0.0.jar` from the releases page.
2. Place the JAR file into your server's `/plugins` directory.
3. Ensure you have **Vault** and a compatible **economy plugin** installed.
4. Restart or reload your server.
## How to Use
### For Shop Owners (Sellers)
1. **Open the Shop Config**: Type `/shopconfig` (or `/startshop`). This opens your personal shop's configuration menu.
2. **Add an Item**: Click on an empty slot in the GUI with the item you want to sell from your cursor.
3. **Set a Price**: An Anvil GUI will pop up. Enter the desired price for the item in the text field and click the result.
4. **Remove an Item**: In the shop config GUI, simply right-click an item you have for sale to remove it.
### For Customers (Buyers)
1. **Browse Shops**: Type `/shop` to open a list of all player shops.
2. **Visit a Shop**: Click on a player's head in the list to open their shop.
3. **Buy an Item**: In a player's shop, click on any item to purchase it. The money will be automatically deducted from your account and the item will be added to your inventory.
## Commands & Permissions
| Command | Description | Permission |
| ---------------- | ------------------------------- | ------------------- |
| `/shop` | Opens the global list of shops. | `peoplesmenu.use` |
| `/shop <player>` | Opens a specific player's shop. | `peoplesmenu.use` |
| `/startshop` | Opens your shop setup GUI. | `peoplesmenu.use` |
| `/shopconfig` | Opens your shop setup GUI. | `peoplesmenu.use` |
- `peoplesmenu.use`: Allows a player to use all basic shop features. (Default: `true`)
- `peoplesmenu.admin`: Administrative permissions. (Default: `op`)
## Configuration
The `config.yml` file allows you to customize various aspects of the plugin.
```yaml
shop:
currency: "$"
max-items-per-player: 10
gui-title: "§a%player%'s Shop"
global-shop-title: "§bAll Player Shops"
messages:
item-sold: "§aYou sold %item% to %buyer% for %price%!"
item-bought: "§aYou bought %item% from %seller% for %price%!"
not-enough-money: "§cYou don't have enough money!"
```
## Credits
This plugin was designed and developed based on a concept by **strusis.fr**.