Release 1.0.0

This commit is contained in:
2026-01-15 11:21:20 +00:00
parent 4734c911b5
commit 30ad0c652a
81 changed files with 674 additions and 1385 deletions
+116 -105
View File
@@ -1,20 +1,23 @@
# CommunityMarket
A professional, production-ready GUI-only marketplace plugin for Minecraft Paper 1.21.11.
[![Modrinth Downloads](https://img.shields.io/modrinth/dt/communitymarket?logo=modrinth)](https://modrinth.com/plugin/communitymarket)
[![GitHub License](https://img.shields.io/github/license/henrique/CommunityMarket)](LICENSE)
Players can create fixed-price listings and auctions, browse, buy, bid, claim items, and withdraw earnings — all through intuitive GUIs. No complex commands to learn!
A professional, production-ready **GUI-only marketplace plugin** for Minecraft Paper 1.21+.
## Features
Players can create fixed-price listings and auctions, browse, buy, bid, claim items, and withdraw earnings — all through intuitive GUIs. **No complex commands to learn!**
## ✨ Features
### 🛒 Fixed-Price Market
- Create listings with custom prices and durations
- Browse paginated listings with categories and sorting
- Browse paginated listings with sorting
- Safe atomic purchases to prevent double-buying
- Configurable taxes on sales
### 🔨 Auction System
- Start auctions with minimum bid and optional buyout
- Anti-snipe protection extends auction when bids arrive near the end
- Start auctions with minimum bid and optional buyout price
- **Anti-snipe protection** extends auction when bids arrive near the end
- Bid history and automatic outbid notifications
- Safe handling of auction endings and payouts
@@ -24,48 +27,53 @@ Players can create fixed-price listings and auctions, browse, buy, bid, claim it
- Handles full inventories gracefully
### 💰 Earnings Management
- Pending earnings from sales
- Withdraw all at once
- Pending earnings from sales accumulate
- Withdraw all earnings at once
- Complete transaction history
### 🔐 Admin Features (GUI-based)
- View all listings and auctions
- Remove any listing
- Cancel/force-end auctions
- Reload configuration
- Remove any listing or cancel auctions
- Force-end auctions
- Reload configuration in-game
### 🎮 Intuitive GUI Flow
The creation flow for listings and auctions:
1. **Main Menu** - Central hub for all actions
2. **Select Item** - Click an item from your inventory to select it
3. **Select Quantity** - Choose how many to sell (for stackable items with quantity > 1)
- Step buttons: -32, -16, -8, -1 and +1, +8, +16, +32
- MIN and MAX preset buttons for quick selection
- Items are matched by exact metadata (material, name, lore, enchants, custom model data)
4. **Settings** - Set price and duration with merged, clickable elements
- Single-item interface: each setting is one clickable item showing all info
- No redundant info/action item pairs
5. **Confirm** - Review and confirm your listing/auction
- Final validation ensures items still exist before creating
2. **Select Item** - Click an item from your inventory
3. **Select Quantity** - Choose how many to sell (for stackable items)
4. **Settings** - Set price and duration with easy click-to-adjust controls
5. **Confirm** - Review and create your listing/auction
## Requirements
## 📋 Requirements
- **Server**: Paper 1.21.11 (or compatible)
- **Java**: Java 21
- **Economy**: One of the following:
- Vault + any Vault-compatible economy (Essentials, CMI, etc.)
- EssentialsX (fallback if Vault is not present)
| Requirement | Version |
|-------------|---------|
| **Server** | Paper 1.21+ (or Purpur, Folia-compatible forks) |
| **Java** | Java 21+ |
| **Economy** | Vault + economy plugin **OR** EssentialsX |
## Installation
### Economy Support
CommunityMarket supports two economy configurations:
1. Download `CommunityMarket-1.0.0.jar`
1. **Vault + Economy Plugin** (Recommended)
- Install [Vault](https://www.spigotmc.org/resources/vault.34315/)
- Install an economy plugin: [EssentialsX](https://essentialsx.net/), CMI, or any Vault-compatible economy
2. **EssentialsX Standalone** (Fallback)
- Install [EssentialsX](https://essentialsx.net/) with economy enabled
- CommunityMarket will use EssentialsX directly if Vault is not present
## 📥 Installation
1. Download the latest `CommunityMarket-x.x.x.jar` from [Modrinth](https://modrinth.com/plugin/communitymarket)
2. Place it in your server's `plugins/` folder
3. Ensure you have an economy plugin installed (Vault recommended)
4. Start/restart your server
3. Ensure you have an economy system installed (see above)
4. Start or restart your server
5. Edit `plugins/CommunityMarket/config.yml` as needed
6. Use `/market` to open the marketplace!
## Commands
## 🎮 Commands
| Command | Alias | Description | Permission |
|---------|-------|-------------|------------|
@@ -73,128 +81,131 @@ The creation flow for listings and auctions:
**That's it!** Everything else is done through GUIs.
## Permissions
## 🔒 Permissions
| Permission | Description | Default |
|------------|-------------|---------|
| `communitymarket.*` | All permissions | op |
| `communitymarket.use` | Access the market GUI | true |
| `communitymarket.sell` | Create fixed-price listings | true |
| `communitymarket.auction` | Create auctions | true |
| `communitymarket.buy` | Purchase from the market | true |
| `communitymarket.bid` | Bid on auctions | true |
| `communitymarket.claim` | Claim items from storage | true |
| `communitymarket.withdraw` | Withdraw earnings | true |
| `communitymarket.use` | Access the market GUI | everyone |
| `communitymarket.sell` | Create fixed-price listings | everyone |
| `communitymarket.auction` | Create auctions | everyone |
| `communitymarket.buy` | Purchase from the market | everyone |
| `communitymarket.bid` | Bid on auctions | everyone |
| `communitymarket.claim` | Claim items from storage | everyone |
| `communitymarket.withdraw` | Withdraw earnings | everyone |
| `communitymarket.admin` | Access admin functions | op |
| `communitymarket.admin.viewall` | View all listings/auctions | op |
| `communitymarket.admin.remove` | Remove any listing/auction | op |
| `communitymarket.admin.reload` | Reload configuration | op |
## Configuration
## ⚙️ Configuration
### config.yml
### config.yml Highlights
```yaml
# Language setting (available: en_US, pt_PT)
language: en_US
# Database Configuration
# Database: sqlite (default) or mysql
database:
type: sqlite # or "mysql"
sqlite:
file: database.db
mysql:
host: localhost
port: 3306
database: communitymarket
username: root
password: ""
type: sqlite
# Economy Settings
# Economy settings
economy:
currency-format: "$#,##0.00"
currency-symbol: "$"
taxes:
market-tax: 5.0 # 5% tax on listings
auction-tax: 7.5 # 7.5% tax on auctions
market-tax: 5.0 # Tax on fixed-price sales
auction-tax: 7.5 # Tax on auction sales
# Market Settings
# Fixed-Price Market
market:
max-listings-per-player: 20
listing-cooldown: 0 # seconds between listings
default-duration-hours: 168 # 7 days
min-price: 1.0
max-price: 1000000000.0
# Auction Settings
# Auctions
auction:
max-auctions-per-player: 10
min-duration-hours: 1
max-duration-hours: 168
default-duration-hours: 24
anti-snipe:
enabled: true
trigger-seconds: 30
extension-seconds: 30
max-extensions: 10
# GUI Settings
gui:
items-per-page: 45
show-help-button: true # Set to false to hide help button in main menu
show-help-button: true # Toggle help button visibility
sounds:
click: UI_BUTTON_CLICK
success: ENTITY_PLAYER_LEVELUP
error: ENTITY_VILLAGER_NO
```
See the full `config.yml` for all options.
### Available Languages
- `en_US` - English (default)
- `pt_PT` - Portuguese
### Languages
Language files are located in `plugins/CommunityMarket/lang/` and can be customized.
CommunityMarket ships with two languages:
- **English (US)**: `en_US`
- **Portuguese (Portugal)**: `pt_PT`
## 🔧 Troubleshooting
### "No compatible economy provider found!"
This error appears when CommunityMarket cannot find an economy system.
**Solutions:**
1. **Install Vault + an economy plugin:**
- Download [Vault](https://www.spigotmc.org/resources/vault.34315/)
- Download [EssentialsX](https://essentialsx.net/) or another economy plugin
- Restart your server
2. **Using EssentialsX without Vault:**
- Make sure EssentialsX is installed and enabled
- Check that `economy` is not disabled in EssentialsX's `config.yml`
### Items stuck in claim storage
If a player's inventory was full when they purchased an item or won an auction, the item goes to their claim storage. They can retrieve it from the main menu → "Claim Items".
### Auctions not ending
Auctions are checked periodically (every 5 seconds by default). If auctions seem stuck:
- Check server console for errors
- Verify the database is working properly
- Try `/market admin` → View Auctions to see auction status
### Database issues
By default, CommunityMarket uses SQLite (no setup required). For larger servers, MySQL is recommended:
Change the language in `config.yml`:
```yaml
language: pt_PT
database:
type: mysql
mysql:
host: localhost
port: 3306
database: communitymarket
username: your_user
password: your_password
```
You can create custom language files by copying an existing one in `plugins/CommunityMarket/lang/`.
## 📊 API
## Building from Source
CommunityMarket does not currently provide a public API. If you need integration capabilities, please open an issue on GitHub.
```bash
git clone https://github.com/henrique/CommunityMarket.git
cd CommunityMarket
mvn clean package
```
## 🤝 Support
The compiled JAR will be in `target/CommunityMarket-1.0.0.jar`.
- **Issues & Bug Reports:** [GitHub Issues](https://github.com/henrique/CommunityMarket/issues)
- **Feature Requests:** [GitHub Issues](https://github.com/henrique/CommunityMarket/issues)
## FAQ
## 📜 License
### Q: The plugin says "No economy plugin found!"
**A:** Install Vault + an economy plugin (like EssentialsX) or just EssentialsX.
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
### Q: Can I use MySQL instead of SQLite?
**A:** Yes! Change `database.type` to `mysql` in config.yml and fill in your credentials.
## 🙏 Credits
### Q: How do I change the GUI titles?
**A:** Edit the language file in `plugins/CommunityMarket/lang/`.
### Q: Items aren't being removed when creating listings?
**A:** This is a known issue with some inventory plugins. Make sure you're running Paper 1.21.11.
### Q: How do taxes work?
**A:** When an item sells, the tax percentage is deducted from the seller's earnings. Buyers pay the listed price.
## Support
- **Issues**: [GitHub Issues](https://github.com/henrique/CommunityMarket/issues)
- **Discord**: Coming soon
## License
MIT License - See LICENSE file for details.
---
Made with ❤️ for the Minecraft community
- Built for the Paper/Spigot community
- Uses [Vault](https://github.com/MilkBowl/VaultAPI) for economy integration
- Uses [HikariCP](https://github.com/brettwooldridge/HikariCP) for database connection pooling