RedPockets - Minecraft Red Packet Plugin
A feature-rich Minecraft red packet plugin that supports both currency red packets and item red packets.
Requirements
- Minecraft 1.21+
- Java 17+
- Spigot/Paper/Folia server
- Vault (optional, for currency red packet feature)
- Dependencies: nbtapi
Languages Supported:
Chinese, English
The language files are located in the resources directory
Features
- Currency Red Packets: Supports both random distribution and equal distribution modes
- Item Red Packets: Players can put in items for others to draw randomly
- Visual GUI: Full graphical interface operation, easy to use
- Broadcast Messages: Real-time broadcasts for sending and grabbing red packets
- Multi-language Support: Built-in Chinese and English language packs
- Data Persistence: Supports MySQL and SQLite databases
- Economy System: Compatible with mainstream economy plugins (Vault)
Installation
- Download the latest version of RedPockets.jar
- Place the plugin into your server's
pluginsfolder - Restart the server or load the plugin
- Configure the
config.ymlfile (optional) - Restart the server to apply configurations
Configuration
Database
database:
# Database type: mysql or sqlite
type: sqlite
# MySQL configuration (only needed when type is mysql)
mysql:
host: localhost
port: 3306
database: redpockets
username: root
password: password
Red Packet Settings
redpocket:
# Red packet expiration time (seconds), 0 means never expire
expire-time: 3600
# Maximum amount for currency red packets
max-amount: 100000.0
# Maximum number of red packets
max-count: 100
Commands
Player Commands
| Command | Description |
|---|---|
/redpocket | Open the red packet creation GUI |
/redpocket create | Create a red packet (opens GUI) |
/grab <RedPacketID> | Grab a specific red packet |
/redpocket preview <RedPacketID> | Preview item red packet contents |
Admin Commands
| Command | Description |
|---|---|
/redpocketadmin delete <RedPacketID> | Delete a specific red packet |
/redpocketadmin reload | Reload plugin configuration |
Permissions
| Permission Node | Description | Default |
|---|---|---|
redpockets.use | Use red packet features | OP |
redpockets.create | Create red packets | OP |
redpockets.grab | Grab red packets | OP |
redpockets.admin | Admin commands | OP |
Usage
Creating Currency Red Packets
- Type
/redpocketto open the main interface - Click on the "Currency Red Packet" icon
- Set the total amount and quantity
- Choose distribution method (random/equal)
- Click "Confirm Send"
Creating Item Red Packets
- Type
/redpocketto open the main interface - Click on the "Item Red Packet" icon
- Click "Edit Items" to open the editing interface
- Drag items into the editing area
- Return to the main interface and click "Confirm Send"
Grabbing Red Packets
- Click on the red packet link in the chat
- Or type
/grab <RedPacketID>
Support
For issues or suggestions, please contact the plugin author.
License
This project is open-sourced under the GPL-3.0 License.
User Guide
Detailed instructions on how to use all features of the RedPockets plugin.
Quick Start
Basic Commands
/redpocket - Open the main red packet interface
/grab <RedPacketID> - Grab a red packet
Your First Red Packet
- Type
/redpocketin-game - In the GUI that appears, select either "Currency Red Packet" or "Item Red Packet"
- Follow the prompts to set parameters
- Click "Confirm Send"
Currency Red Packets
Overview
Currency red packets are based on in-game currency. Players receive corresponding currency after grabbing them.
Creation Steps
-
Open Creation Interface
/redpocketClick on the "Currency Red Packet" icon
-
Set Total Amount
- Click the "Total Amount" item
- Enter the amount in chat (e.g.,
100) - Enter
cancelto cancel
-
Set Quantity
- Click the "Quantity" item
- Enter the quantity in chat (e.g.,
10) - The quantity indicates how many people can grab the red packet
-
Choose Distribution Method
- Random Distribution: Each person gets a random amount, with a "Lucky Draw" possible
- Equal Distribution: Everyone gets the same amount
-
Set Note (Optional)
- Click the "Set Note" item
- Enter the note information in chat
-
Confirm Sending
- Check if settings are correct
- Click "Confirm Send"
- The red packet will be sent to all online players
Distribution Methods
Random Distribution
- The system randomly allocates amounts based on total amount and quantity
- Each person receives a different amount
- The person who grabs the most will be shown as "Lucky Draw" after the red packet is fully claimed
- Suitable for adding fun and interactivity
Equal Distribution
- Total amount is divided equally among all recipients
- Everyone receives the same amount
- Suitable for fair distribution scenarios
Item Red Packets
Overview
Item red packets allow senders to place items for other players to randomly draw. It's a great way to give gifts to friends!
Creation Steps
-
Open Creation Interface
/redpocketClick on the "Item Red Packet" icon
-
Edit Items
- Click the "Edit Items" icon
- Open the item editing interface (54 slots)
- Drag items you want to send into the editing area
- You can place multiple items, one item per slot
- Items can be stacked
-
Return to Main Interface
- Closing the edit interface saves automatically
- Return to the creation interface
-
Confirm Sending
- Check the item quantity
- Click "Confirm Send"
- The red packet will be sent to all online players
Features
- Random Draw: Players randomly receive one of the items
- Uniqueness: Each item can only be grabbed once
- Auto-lock: Items are automatically locked after sending and cannot be modified
- Expiry Return: Unclaimed items are automatically returned when the red packet expires
Important Notes
- Ensure items have been placed in the editing area
- Confirm item settings before sending
- Items will be automatically returned when the red packet expires
Grabbing Red Packets
Method 1: Click Chat Link
When someone sends a red packet, it will appear in the chat:
Player xxx sent 10 red packets worth 100 coins each, [Click here to grab]
Simply click on the green "[Click here to grab]" text to grab the red packet.
Method 2: Use Command
/grab <RedPacketID>
You need to know the red packet ID to grab it.
Viewing Red Packet ID
Click on the "type" text in the chat to view the red packet ID.
Preview Feature
Item Red Packet Preview
In the item red packet broadcast message, click on the "Item Red Packet" text to preview the red packet contents:
Player xxx sent an Item Red Packet containing 5 items, [Click to view]
The preview feature allows you to see what items are in the red packet, but you cannot take items from it.
Preview Notes
- The preview interface is read-only
- You cannot take items from the preview
- Preview data is stored in memory
- The preview automatically disappears when the red packet expires or is fully claimed
FAQ
Q: What should I do if I get an "insufficient balance" prompt when grabbing a red packet?
A: Currency red packets require an economy system. Please ensure:
- Vault plugin is installed
- An economy plugin (like Essentials) is installed
- Server economy features are enabled
Q: Where do items go when a red packet expires?
A: When item red packets expire:
- Unclaimed items are automatically returned to the sender
- You can view remaining items through the item editing interface
- Reopen the item editing interface to see the returned items
Q: How can I modify a sent red packet?
A: Sent red packets cannot be modified:
- Currency red packets: Amount and quantity are fixed after sending
- Item red packets: Items are automatically locked after sending
Q: Why is the edit interface still read-only even after all items in an item red packet have been claimed?
A: This might be a bug. Please try:
- Waiting a few seconds for it to refresh
- Reopening the edit interface
- Contacting an administrator if the issue persists
Q: Can I see what others have grabbed?
A: Yes, the system broadcasts in real-time:
- Currency red packets: Shows the amount grabbed
- Item red packets: Shows the grabbed item name and quantity
Q: How do I delete a red packet?
A: Only administrators can delete red packets:
/redpocketadmin delete <RedPacketID>
Q: What should I do if data is lost?
A: Please back up your database regularly:
- MySQL: Regularly back up the
redpocketsdatabase - SQLite: Back up the
plugins/RedPockets/redpockets.dbfile
Q: Which economy plugins are supported?
A: Supports all Vault-compatible economy plugins:
- EssentialsX
- CMI
- VaultEconomy
- Other mainstream economy plugins
Q: What are the maximum amounts and quantities for red packets?
A: These can be configured in config.yml:
redpocket:
max-amount: 100000.0 # Maximum amount
max-count: 100 # Maximum quantity
Tips
- Note Function: Add notes to red packets to make them more meaningful
- Preview Items: Preview item red packets before grabbing to see what items are available
- Equal Distribution: Choose equal distribution mode for fair distribution
- Random Distribution: Choose random distribution mode to increase interactive fun
- Watch Expiry Time: Default expiration is 1 hour, remember to grab in time

