Cmail 是一款專為 Paper (Minecraft 1.21.x+) 伺服器設計的虛擬郵件與禮包系統。本插件採用 SQLite 本地資料庫儲存郵件數據,並支援 Vault 經濟系統。具備完整的 NBT 道具保存能力,可供管理員打包禮包並進行批次指令分發,適用於伺服器道具發放與自動化商城整合。
功能特性
- 安全防護機制:
- 當玩家在「放入附件」或「編輯禮包」時,若因異常斷線、伺服器重載或非正常關閉選單,系統會自動將所有道具退回玩家背包。若背包空間不足,則會自然掉落於玩家所在的世界座標,防止道具遺失或複製漏洞。
- 唯讀選單全面禁用 Shift-Click 與滑鼠拖曳限制,防止附件道具異常移出。
- NBT 禮包範本系統:
- 管理員可在遊戲內打開 36 格介面,將含有自訂 NBT 數據(如自訂金幣、特殊標籤道具、Lore 武器)擺放完成並進行打包。
- 支援通過主機或控制台指令(支援以逗號分隔多位玩家名稱)將打包好的禮包範本直接分發給多位玩家。
- 控制台指令整合:
- 提供
consolesend與sendpack指令,可直接由控制台、RCON 或外部腳本調用以發送郵件與物品。
- 提供
- 管理員後台審查:
- 管理員可調閱全伺服器所有歷史信件。內建安全鎖機制,解鎖後始可修改信件內文、調整信件附件,並支援在確認後永久刪除郵件。
- Vault 經濟整合:
- 可啟用發信手續費與附件手續費,並在玩家寄信時顯示扣款確認界面。
- 發信人自訂:
- 系統發送的信件(如禮包、後台信件)之發信人名稱可於
config.yml中自由配置,支援色彩代碼。
- 系統發送的信件(如禮包、後台信件)之發信人名稱可於
- 自動清理機制:
- 定時自動清理過期郵件,可設定保留天數及是否清理未讀/含附件郵件。
指令與權限
| 指令 | 說明 | 執行端 | 權限節點 | 預設 |
|---|---|---|---|---|
/cmail 或 /cmail mail |
開啟個人收件箱 GUI | 僅限玩家 | cmail.use |
所有人 |
/cmail send <玩家> <訊息> |
撰寫郵件並開啟附件放置 GUI | 僅限玩家 | cmail.use |
所有人 |
/cmail help |
顯示指令說明清單 | 僅限玩家 | cmail.use |
所有人 |
/cmail admin |
開啟管理員審查選單 | 僅限玩家 | cmail.admin |
OP |
/cmail sendall <訊息> |
撰寫並發送全服廣播郵件 | 僅限玩家 | cmail.admin |
OP |
/cmail reload |
重新載入設定檔 | 遊戲內 / 控制台 | cmail.admin |
OP |
/cmail savepack <禮包名稱> |
在遊戲內打包道具為禮包範本 | 僅限玩家 | cmail.admin |
OP |
/cmail sendpack <玩家1,玩家2,...> <禮包名稱> <訊息> |
發送禮包範本給多位玩家 | 遊戲內 / 控制台 | 控制台無限制 / cmail.admin |
OP |
/cmail consolesend <玩家1,玩家2,...> <訊息> [材質:格位:數量]... |
透過純指令發送特定排列的道具給多位玩家 | 遊戲內 / 控制台 | 控制台無限制 / cmail.admin |
OP |
Cmail is a virtual mail and gift package system tailored for Paper (Minecraft 1.21.x+) servers. Utilizing a local SQLite database for mail data storage and supporting the Vault economy system, this plugin features complete NBT item preservation. Administrators can bundle reward packages and distribute them via batch commands, making it ideal for in-game item distribution and automated store integration.
Features
-
Security Mechanisms:
-
If a player disconnects unexpectedly, the server reloads, or an inventory is closed abnormally while placing attachments or editing packages, the system automatically returns all items to the player's inventory. If the inventory is full, items will drop naturally at the player's world coordinates, preventing item loss or duplication exploits.
-
Read-only menus completely disable Shift-Click and mouse drag actions to prevent attachment items from being improperly moved.
-
NBT Package Template System:
-
Administrators can open a 36-slot GUI in-game to arrange and pack items containing custom NBT data (such as custom currencies, special tagged items, and Lore weapons).
-
Supports distributing packaged templates to multiple players via in-game or console commands (supports comma-separated player names).
-
Console Command Integration:
-
Provides
consolesendandsendpackcommands that can be invoked directly by the console, RCON, or external scripts to send mail and items. -
Admin Review Panel:
-
Administrators can inspect all historical mail across the entire server. Features a built-in security lock mechanism; once unlocked, admins can modify mail content, adjust attachments, and permanently delete mail upon confirmation.
-
Vault Economy Integration:
-
Allows enabling sending fees and attachment fees, displaying a deduction confirmation interface when players send mail.
-
Custom Sender Name:
-
The sender name for system-sent mail (such as gift packages and backend mail) can be freely configured in
config.yml, with color code support. -
Auto-Purge Mechanism:
-
Periodically cleans up expired mail automatically, with configurable retention days and options to preserve/delete unread mail or mail containing attachments.
Commands & Permissions
| Command | Description | Executed By | Permission Node | Default |
|---|---|---|---|---|
/cmail or /cmail mail |
Opens personal inbox GUI | Player Only | cmail.use |
Everyone |
/cmail send <player> <message> |
Composes mail and opens attachment GUI | Player Only | cmail.use |
Everyone |
/cmail help |
Displays the command help list | Player Only | cmail.use |
Everyone |
/cmail admin |
Opens admin review menu | Player Only | cmail.admin |
OP |
/cmail sendall <message> |
Composes and sends broadcast mail to all players | Player Only | cmail.admin |
OP |
/cmail reload |
Reloads configuration files | In-game / Console | cmail.admin |
OP |
/cmail savepack <pack_name> |
Packs items into a package template in-game | Player Only | cmail.admin |
OP |
/cmail sendpack <player1,player2,...> <pack_name> <message> |
Sends a package template to multiple players | In-game / Console | Console Unrestricted / cmail.admin |
OP |
/cmail consolesend <player1,player2,...> <message> [material:slot:amount]... |
Sends custom arranged items to multiple players via pure command | In-game / Console | Console Unrestricted / cmail.admin |
OP |