YuPay Payment Plugin – Official Release
A modern Minecraft payment plugin designed to make server donation management easier, safer, and more powerful than ever before.
Overview
YuPay is a Minecraft payment plugin that integrates WeChat Pay and Alipay directly through official APIs. It provides a complete solution covering donation initiation, payment processing, reward distribution, statistics, and player incentives.
No middlemen – connect directly to official payment platforms to maximize revenue and minimize costs.
Server owners must comply with local laws and payment platform regulations. All funds are considered voluntary donations to support server operations, not purchases of goods or services.
中文介绍
minebbs
mcbbs
✨ Key Features
1. Multiple Payment Methods
YuPay connects directly to WeChat Pay and Alipay official APIs, supporting multiple integration modes for secure and seamless transactions.
Payment Method
Integration Mode
Features
WeChat Pay Native API Secure, official direct connection, QR code payment
Alipay Public Key / Certificate Mode Flexible and secure, supports face‑to‑face payment, Huabei, credit cards, balance, etc.
- Default payment method: Set a preferred method (e.g., WeChat). Players can also specify a method in the command.
- Fallback: Automatically switches to an alternative method if the default is unavailable – orders never fail.
2. Dual Economy System Support
- Vault compatible: Works with Essentials, CMI, and other economy plugins.
- PlayerPoints native: Perfect for point‑based systems.
- One‑click switch: Change economy type in the config file without restarting.
️ 3. High‑Performance Database Design
- Dual database support:
- SQLite: Lightweight, ready to use – ideal for small servers.
- MySQL: Cluster‑ready, data synchronization – perfect for large networks.
- Connection pooling: Uses HikariCP for high concurrency.
- Smart indexing: Automatically creates indexes for fast queries even with large datasets.
4. Intelligent Callback Server
- Unified callback endpoint: A single port handles callbacks from all payment channels, simplifying firewall configuration.
- Automatic path registration: Parses notify URLs and registers handlers automatically.
- Thread‑safe: Callbacks run asynchronously, never blocking the main server thread.
⌨️ 5. Fully Customizable Command System
YuPay lets you tailor every command to your server’s style.
- Configurable command names: All primary command names and aliases can be changed in the config – e.g., turn /pay into /donate, /sponsor, or any name you like.
- Rich subcommand set: The main /yupay command includes:
- pay <amount> [method] [mode] [-n] – Start a donation (add -n for no‑reward mode)
- top – View donation leaderboard
- total [player|all] – Check donation totals
- history [page|player] – View order history
- reload – Reload configuration
- set <option> <value> – Modify config settings in‑game
- ban <player|all> [reason] – Ban a player (or all) from donating
- unban <player|all> – Unban a player (or all)
- convert <player> <from> <to> <amount> – Convert between economies
- config – Display current configuration
- Permission‑controlled: Each subcommand has its own permission node – fine‑tune access with LuckPerms or similar.
- Tab completion: Smart parameter suggestions make commands easy to use.
- Fully customizable messages: All feedback texts can be edited and support color codes.
6. Multi‑Tier Reward System
Rewards are defined as server commands (e.g., give, effect, lp user) in the config file, enabling unlimited possibilities.
Reward Type
Trigger
Characteristics
Base Reward Every successful donation Custom command sequence, variables {player}, {amount}, {points}
Single Amount Milestone One‑time donation reaches a threshold Multiple tiers, commands run immediately each time
Total Amount Milestone Cumulative donation reaches a threshold One‑time permanent reward, prevents duplicate execution
Recent Total Milestone Cumulative donation within a time period Periodic rewards, perfect for events, configurable time range
No‑Reward Mode Use -n flag Pure support donation, no economy or command rewards triggered
7. Comprehensive Statistics
- Personal stats: Players can check their total donated amount and details.
- Global leaderboard: Real‑time Top 10 ranking.
- Server overview: Admins can view total server donations.
- Order history: Players can browse past orders (order ID, amount, status, time). Admins can view any player’s history.
- Offline player support: Renames are handled correctly.
8. Deep PlaceholderAPI Integration
YuPay provides over 30 placeholders for dynamic display in chat, scoreboards, name tags, item lore, and more. All amount placeholders return two‑decimal strings.
Available Placeholders
Placeholder
Description
Example Output
%yupay_is_banned% Whether the player is banned from donating true / false
%yupay_total% Player’s total donated amount (yuan) 100.50
%yupay_total_orders% Player’s total order count 5
%yupay_success_orders% Player’s successful order count 5
%yupay_rank% Player’s ranking (custom text if unranked) 3 or Unranked
%yupay_has_paid_in_<time>% Whether the player donated within the last <time> ms true
%yupay_recent_amount_gt_<time>_<amount>% Whether donations in the last <time> ms exceeded <amount> true
%yupay_orders_in_<time>% Player’s order count in the last <time> ms 3
%yupay_success_orders_in_<time>% Player’s successful orders in the last <time> ms 3
%yupay_amount_in_<time>% Player’s total donated amount in the last <time> ms 150.00
%yupay_is_limited% Whether the player is limited by daily cap false
%yupay_daily_remaining% Remaining amount available for today 50.00
%yupay_server_total% Total server donations 12500.75
%yupay_server_total_orders% Total server orders 123
%yupay_server_success_orders% Total server successful orders 120
%yupay_server_orders_in_<time>% Server orders in the last <time> ms 30
%yupay_server_success_orders_in_<time>% Server successful orders in the last <time> ms 28
%yupay_server_amount_in_<time>% Server donations in the last <time> ms 2500.00
%yupay_pay_methods_count% Number of available payment methods 2
%yupay_pay_methods_list% List of available payment methods (comma‑separated) wechat, alipay
%yupay_top_<rank>_name% / %yupay_top<rank>_name% Player name at rank <rank> (supports dynamic rank) Steve
%yupay_top_<rank>_amount% / %yupay_top<rank>_amount% Donation amount at rank <rank> 1000.00
Dynamic placeholders: <time> in milliseconds, <amount> as a numeric threshold, <rank> from 1 to 10. Use these with any PlaceholderAPI‑compatible plugin for dynamic data displays.
9. Professional Security Design
- Signature verification: Full implementation of WeChat and Alipay signature checks – no forged callbacks.
- Idempotent processing: Prevents duplicate reward distribution.
- Secure communication: Supports HTTPS callbacks; certificate mode for extra security.
- Blacklist system: Ban specific players (or all players with all) from donating, with reason logging.
10. Excellent User Experience
- QR code display: Automatically generates payment QR codes in three output modes:
- Link mode: Clickable chat link that opens the payment page.
- Text QR code: ASCII QR code in chat – works even on clients that don’t support links (e.g., Bedrock).
- Map QR code: Creates a map item with the QR code (requires ProtocolLib).
- Sound feedback: Success sounds, click sounds, etc., enhance interactivity.
- Asynchronous processing: Database and API calls never block the main thread.
- Detailed logging: Comprehensive logs for troubleshooting.
️ 11. Highly Configurable
- Modular config: Payment, economy, database, and reward sections are independent.
- Flexible rewards: Write any server command sequence, with rich variable support.
- Fully customizable messages: All user‑facing text can be edited, supports color codes.
- Table prefix: Add a prefix to database tables to avoid conflicts.
- Amount limits: Configure min/max per‑transaction and daily cumulative caps.
- Dynamic toggles: Enable/disable economy rewards and command rewards independently – perfect for pure donation mode.
12. Developer Friendly
- Clean code structure: Layered architecture, clear responsibilities.
- Extensible: Add new payment methods by implementing a simple interface.
- Well‑commented: Critical code sections explained.
- Robust error handling: Comprehensive exception handling and logging.
⚙️ 13. Easy Administration
- Hot reload: Reload configuration without restarting using /yupay reload.
- In‑game config editing: Use /yupay set to modify key settings on the fly (economy toggle, command toggle, amount limits).
- Command aliases: Set multiple aliases for convenience.
- Permission groups: Pre‑defined permission nodes and group suggestions for easy setup.
- Console‑friendly: Startup logs show detailed status and configuration checks.
⚡ 14. Performance Optimizations
- Asynchronous operations: All database, network, and callback tasks run off the main thread.
- Connection pooling: Reuses database connections efficiently.
- Caching: Reduces unnecessary queries.
- Clean shutdown: Properly releases resources on disable.
15. Use Cases Across Different Server Sizes
Server Type
Recommended Setup
Advantages
Small server SQLite + Vault Lightweight, ready to use
Medium server MySQL + both payment methods Centralized data, full feature set
Large network MySQL cluster + PlayerPoints Cross‑server sync, high performance
Payment Flow
- Player runs a command, e.g., /pay 100 wechat (optional -n for no‑reward).
- Plugin asynchronously creates an order in the database.
- Calls the payment API to obtain a payment link.
- Generates and sends a QR code (link/text/map) to the player.
- Player scans and pays.
- Payment platform sends a callback to the server.
- Plugin verifies the signature and confirms payment.
- Rewards are distributed (base, single‑amount, total, recent) – skipped for no‑reward orders. Order status is updated.
Reward Trigger Mechanism
- Immediate: Base reward runs right after payment (unless no‑reward).
- Conditional: Matches single‑amount, total, or recent total thresholds.
- Non‑repetitive: Total milestone rewards are recorded to prevent duplicates.
- Asynchronous: All commands run off‑thread to avoid lag.
Data Management
Database Tables
Table
Purpose
yu_payments Stores all payment orders, supports multi‑dimensional queries
yu_total_levels Records which total milestones a player has already received
yu_banned_players Stores banned players’ UUIDs and reasons (supports global ban *)
Statistics Capabilities
- Real‑time personal totals and details.
- Global Top 10 leaderboard.
- Time‑based sums (today, this week, this month, custom intervals).
- Server‑wide statistics via PlaceholderAPI.
Deployment Advantages
- Quick start: Drop into the plugins folder, configure payment credentials, economy, and rewards, then start.
- Easy maintenance: Hot reload, detailed logs, and monitoring.
- Smooth upgrades: Automatic config updates preserve user settings.
Suitable Scenarios
- Server owners: Reliable donation collection and management.
- Community managers: Use incentives to engage players.
- Event planners: Flexible reward rules for seasonal or limited‑time campaigns.
- Developers: Extend or integrate YuPay into other projects.
Business Value
For Server Owners
- Increase revenue: Smooth payment flow boosts conversion.
- Improve retention: Reward systems keep players engaged.
- Build community: Leaderboards encourage friendly competition.
- Lower overhead: Automation reduces manual work.
For Players
- Easy payment: Scan a QR code, no hassle.
- Instant rewards: Receive benefits immediately.
- Transparent progress: Check totals, rankings, and history anytime.
- Clear goals: Milestones provide long‑term objectives.
Summary
YuPay is more than just a payment plugin – it’s a complete Minecraft server donation and player incentive system.
Whether you run a small server or a large network, you get a professional, reliable, and easy‑to‑use solution.
✨ Core Advantages
- ✅ Stable & Reliable: Tested in production environments, compatible with major versions.
- ✅ Feature‑rich: Covers the entire donation lifecycle – payment, callback, rewards, statistics, management.
- ✅ Easy to Use: Comprehensive documentation and examples.
- ✅ Highly Extensible: Modular design for easy customization.
- ✅ Continuously Improved: Well‑structured code for long‑term maintenance.
Join our community for support and feedback: QQ Group 1080918424
If you’re looking for a professional, powerful, and trustworthy payment plugin for your Minecraft server, YuPay is the perfect choice!