MaskUI 是一款面向 Paper 服务器的生存面具插件。玩家可以购买并装备各种面具,这些面具体现了探索、挖矿、战斗、下界旅行以及一般生存等不同方面的效果。
该插件包含七种面具等级、基于库存的商店、Vault 经济支持、面具出售功能以及购买追踪机制。
特性
- 七种具有不同效果和生存用途的面具
- 基于库存的面具商店
- 在主手或副手中右键点击即可装备面具
- 装备面具后自动生效
- Vault 经济支持
- 可自定义价格和消息
- 支持面具出售及可配置的退款金额
- 购买追踪以防止重复退款
- 使用持久化的物品标签来识别真实的 MaskUI 面具
- 支持 Minecraft 1.16.x–1.21.x
面具
每种面具均提供生命视觉 I 效果,并根据其设计用途附加其他效果。
| 等级 |
面具 |
默认价格 |
用途 |
| 1 |
Skeleton |
5,000 |
探索 |
| 2 |
Zombie |
10,000 |
耐久与恢复 |
| 3 |
Creeper |
15,000 |
机动性与防御 |
| 4 |
Piglin |
20,000 |
下界探索 |
| 5 |
Steve |
25,000 |
挖矿与建造 |
| 6 |
Wither Skeleton |
30,000 |
战斗 |
| 7 |
Dragon |
35,000 |
全面生存 |
较高等级提供更强的整体能力和实用性,但每种面具都是围绕特定用途设计的,而非简单地继承前一个等级的所有效果。
在游戏中使用 /mask wiki 查看完整的效果列表。
依赖
- Paper 或 Spigot 1.16.x–1.21.x
- Vault
- 一个兼容 Vault 的经济插件,例如 EssentialsX Economy
如果 Vault 无法找到经济提供商,则禁用面具购买功能。其他可用的命令和菜单仍可正常使用。
安装
- 下载最新的 MaskUI JAR 文件。
- 安装 Vault 和一个兼容 Vault 的经济插件。
- 将插件 JAR 文件放入服务器的
plugins 目录中。
- 启动或重启服务器。
- 编辑
plugins/MaskUI/config.yml 以自定义插件配置。
- 修改配置后使用
/mask reload 重载。
命令
| 命令 |
描述 |
权限 |
/mask |
打开面具商店 |
maskui.command |
/mask open |
打开面具商店 |
maskui.command |
/mask shop |
打开面具商店 |
maskui.command |
/mask wiki |
查看面具效果 |
maskui.command |
/mask status |
显示已装备的面具及其效果 |
maskui.command |
/mask buy <mask> |
打开购买确认界面 |
maskui.command |
/mask sell [mask] |
打开出售菜单或预览符合条件的面具 |
maskui.command |
/mask help |
显示可用命令 |
maskui.command |
/mask github |
显示源代码仓库 |
maskui.command |
/mask give <player> <mask> |
向在线玩家发放面具 |
maskui.admin |
/mask reload |
重载价格和消息 |
maskui.admin |
maskui.command 默认对所有玩家开放。maskui.admin 默认为服务器管理员(OP)保留。
可用的面具 ID:
skeleton
zombie
creeper
piglin
steve
wither
dragon
佩戴面具
在主手或副手持有一个 MaskUI 面具时,右键点击即可装备。头盔槽位必须为空。
佩戴面具会将其中一个面具移入头盔槽位,而不会复制物品(包括在创造模式下)。可以通过正常的盔甲栏移除面具。
带有标签的 MaskUI 面具在右键点击时不会作为方块放置。普通的生物头颅保持原版正常行为。
佩戴面具期间会自动应用面具效果。效果会在过期前刷新以防止生命视觉闪烁,并在面具被卸下或替换后不久移除。
MaskUI 不会移除已有的外部药水效果。
出售面具
通过 MaskUI 商店购买的面具可以使用以下命令出售:
/mask sell
/mask sell <mask>
默认情况下,符合条件的面具将获得原价 50% 的退款。
例如,花费 5,000 购买的 Skeleton 面具即使之后商店价格发生变化,仍会退还 2,500。
出售功能可在 config.yml 中进行配置:
selling:
enabled: true
refund-percent: 50
退款百分比必须大于 0 且不超过 100。无效值将禁用退款功能。
只有拥有有效购买记录的面具才符合退款条件。免费获取的面具、通过 /mask give 获得的面具、普通生物头颅以及早期未追踪的面具均无法出售。
任何持有已购买面具的玩家都可以将其出售。卖家无需是原始买家。
每次购买都会生成唯一的收据,因此即使存在相同购买 ID 的复制品,也不会产生额外的退款。
交易安全
MaskUI 追踪购买和销售记录,以降低物品复制或重复退款的风险。
在购买资格、余额、库存空间、价格、物品收据和退款金额等方面,会在确认阶段再次进行检查。
如果经济提供商通常拒绝退款,则面具及其出售权将被恢复。
结果不确定的交易(例如在经济操作过程中中断)不会自动重试。这防止了同一张收据被兑换两次。
项目文档中提供了针对服务器管理员的详细恢复程序。
配置
可以单独配置面具价格:
masks:
skeleton:
price: 5000
dragon:
price: 35000
消息和其他插件行为也可以通过 config.yml 进行自定义。
消息支持传统的 & 颜色代码。购买消息支持 {mask} 和 {price} 占位符。
Minecraft 兼容性
MaskUI 旨在通过单个 JAR 文件支持 Minecraft 1.16.x–1.21.x。
插件使用了以下技术:
api-version: 1.16
- 以 Spigot 1.16.1 作为基准编译 API
- Java 8 兼容的插件字节码
- 跨版本药水效果名称的兼容性处理
- 在没有原生 Piglin Head 的版本上为 Piglin 面具提供 Player Head 回退方案
请运行你的 Minecraft 服务器所需的 Java 版本。
尚未在支持的范围内完成对每个 Paper 和 Spigot 版本的完整运行时测试矩阵。针对基线 API 进行编译并不能保证与每一个服务器构建版本兼容。
致谢
MaskUI 由 SkulZOnTheYT 开发,并在 LEAP 下维护。
基于 misael38 的原始 MaskShop 概念。
MaskUI is a survival mask plugin for Paper servers. Players can purchase and equip masks that provide different effects for exploration, mining, combat, Nether travel, and general survival.
The plugin includes seven mask tiers, an inventory-based shop, Vault economy support, mask selling, and purchase tracking.
Features
- Seven masks with different effects and survival roles
- Inventory-based mask shop
- Right-click to equip masks from either hand
- Automatic effects while a mask is equipped
- Vault economy support
- Configurable prices and messages
- Mask selling with configurable refunds
- Purchase tracking to prevent duplicate refunds
- Persistent item tags for identifying real MaskUI masks
- Support for Minecraft 1.16.x–1.21.x
Masks
Every mask provides Night Vision I along with effects based on its intended role.
| Tier |
Mask |
Default Price |
Role |
| 1 |
Skeleton |
5,000 |
Exploration |
| 2 |
Zombie |
10,000 |
Durability and recovery |
| 3 |
Creeper |
15,000 |
Mobility and defense |
| 4 |
Piglin |
20,000 |
Nether exploration |
| 5 |
Steve |
25,000 |
Mining and building |
| 6 |
Wither Skeleton |
30,000 |
Combat |
| 7 |
Dragon |
35,000 |
All-round survival |
Higher tiers provide greater overall power and utility, but each mask is designed around a specific role rather than simply inheriting every effect from the previous tier.
Use /mask wiki in-game to view the complete effect list.
Requirements
- Paper or Spigot 1.16.x–1.21.x
- Vault
- A Vault-compatible economy plugin, such as EssentialsX Economy
Mask purchases are disabled if Vault cannot find an economy provider. Other available commands and menus remain usable.
Installation
- Download the latest MaskUI JAR.
- Install Vault and a Vault-compatible economy plugin.
- Place the plugin JARs in your server's
plugins directory.
- Start or restart the server.
- Edit
plugins/MaskUI/config.yml to customize the plugin.
- Use
/mask reload after changing the configuration.
Commands
| Command |
Description |
Permission |
/mask |
Open the mask shop |
maskui.command |
/mask open |
Open the mask shop |
maskui.command |
/mask shop |
Open the mask shop |
maskui.command |
/mask wiki |
View mask effects |
maskui.command |
/mask status |
Show the equipped mask and its effects |
maskui.command |
/mask buy <mask> |
Open purchase confirmation |
maskui.command |
/mask sell [mask] |
Open the sell menu or preview an eligible mask |
maskui.command |
/mask help |
Show available commands |
maskui.command |
/mask github |
Show the source repository |
maskui.command |
/mask give <player> <mask> |
Give a mask to an online player |
maskui.admin |
/mask reload |
Reload prices and messages |
maskui.admin |
maskui.command is available to players by default. maskui.admin defaults to server operators.
Available mask IDs:
skeleton
zombie
creeper
piglin
steve
wither
dragon
Wearing Masks
Hold a MaskUI mask in your main hand or off-hand and right-click to equip it. The helmet slot must be empty.
One mask is moved into the helmet slot without duplicating the item, including in Creative mode. Masks can be removed normally through the armor slot.
Tagged MaskUI masks are not placed as blocks when right-clicked. Ordinary mob heads retain their normal vanilla behavior.
Mask effects are automatically applied while the mask is equipped. They are refreshed before expiring to prevent Night Vision flicker and are removed shortly after the mask is removed or replaced.
Existing external potion effects are not removed by MaskUI.
Selling Masks
Masks purchased through the MaskUI shop can be sold using:
/mask sell
/mask sell <mask>
By default, eligible masks receive a 50% refund based on the price originally paid.
For example, a Skeleton mask purchased for 5,000 will refund 2,500 even if its shop price changes later.
Selling can be configured in config.yml:
selling:
enabled: true
refund-percent: 50
The refund percentage must be greater than 0 and no greater than 100. Invalid values disable refunds.
Only masks with a valid purchase record are eligible for refunds. Free masks, masks obtained through /mask give, ordinary mob heads, and older untracked masks cannot be sold.
Any player holding a purchased mask may sell it. The seller does not need to be the original buyer.
Each purchase receives a unique receipt, so duplicated items with the same purchase ID cannot generate additional refunds.
Transaction Safety
MaskUI tracks purchases and sales to reduce the risk of duplicated items or refunds.
Purchase eligibility, balance, inventory space, price, item receipts, and refund values are checked again during confirmation.
If an economy provider normally rejects a refund, the mask and its selling rights are restored.
Transactions with an uncertain result, such as an interruption during an economy operation, are not automatically retried. This prevents the same receipt from being redeemed twice.
Detailed recovery procedures for server administrators are available in the project documentation.
Configuration
Mask prices can be configured individually:
masks:
skeleton:
price: 5000
dragon:
price: 35000
Messages and other plugin behavior can also be customized through config.yml.
Messages support legacy & color codes. Purchase messages support the {mask} and {price} placeholders.
Minecraft Compatibility
MaskUI is designed to support Minecraft 1.16.x–1.21.x from a single JAR.
The plugin uses:
api-version: 1.16
- Spigot 1.16.1 as the baseline compile API
- Java 8-compatible plugin bytecode
- Compatibility handling for potion effect names across versions
- A Player Head fallback for the Piglin mask on versions without a native Piglin Head
Run the Java version required by your Minecraft server.
A complete runtime test matrix across every Paper and Spigot release in the supported range has not yet been completed. Compilation against the baseline API does not guarantee compatibility with every individual server build.
Credits
MaskUI is developed by SkulZOnTheYT and maintained under LEAP.
Based on the original MaskShop concept by misael38.
评论 0
登录后参与评分
还没有评论,来抢沙发吧