ShopKeeperPlus
Report ➚
一款高度可定制、功能齐全的 PaperMC 商店守卫插件。它允许你创建自定义实体(村民、流浪商人、僵尸村民)作为商店守卫,拥有完全自定义的交易、装备和行为,无需依赖原版 Minecraft 商人的限制。
📌 兼容性
- 平台: PaperMC(及其分支如 Purpur / Pufferfish)
- Minecraft 版本: 1.20.5+ 至 26.3+
- Java 版本: Java 21 或更高版本(建议 Paper 26.1+ 使用 Java 25)
🚀 特性
1. 自定义实体商店守卫
- 生成村民、流浪商人或僵尸村民作为商店守卫。
- 幼崽支持: 与原版 Minecraft 不同,幼崽也可以进行交易!
- 徽章颜色: 独立于职业更改村民的徽章颜色(等级 1-5)。
- 职业与生物群系: 更改村民的职业和生物群系(村民类型)。
- 装备编辑器: 为你的商店守卫提供自定义护甲、武器或物品,包括头部、胸部、腿部、脚部、主手和副手槽位。
- 自定义名称: 使用颜色代码(
&)重命名商店守卫。默认情况下名称隐藏,但在悬停/注视时显示。
- 注视玩家: 商店守卫会动态旋转头部以注视附近的玩家(忽略处于 Vanish 模式的玩家)。
- WorldGuard 绕过: 即使在具有
mob-spawning: deny 的区域也能成功生成。
2. 高级交易编辑器 GUI
- 通过Shift + 右键点击商店守卫打开编辑器。
- 每页 9 笔交易,最多 20 页(每个商店 180 笔自定义交易)。
- 垂直布局: 结果(顶部)、成本 1(中间)、成本 2(底部)。
- DataComponent 保护: 使用 Base64 字节序列化保存并严格检查物品。不匹配的 NBT/DataComponent 物品(例如具有不同背景故事或附魔的物品)将被拒绝。
- 无物品卡死: 空槽位处理完美,物品不会“跳跃”到其他槽位。
3. 自定义商店 GUI
- 一个自定义构建的 GUI,模仿原版 Minecraft 商人 GUI,但不受原版限制束缚。
- 自动填充: 点击交易会自动将所需物品从你的库存移动到成本槽位。
- 快速交易: 购买物品后,系统会立即从你的库存中补充成本槽位,允许连续快速购买。
- 防重复: 如果物品不足,会显示灰色玻璃板预览,并阻止交易以防止物品重复。
- 严格交易: 如果提供的物品与所需的 DataComponents 不完全匹配,交易将被取消。
4. 数据与保护
- YAML 存储: 每个商店守卫都安全地保存在
plugins/ShopKeeperPlus/shopdata/<random_name>.yml 中。
- 自动重生: 服务器重启或插件重载后,商店守卫会在其保存的位置自动重生。
- 孤儿清理: 加载区块时自动移除幽灵实体。
- 无敌状态: 商店守卫免疫所有伤害(火焰、爆炸、
/kill、/killall)且无法被推离。
- 开放/关闭状态: 使用编辑器中的切换开关(绿色/红色旗帜)暂时禁用特定商店守卫的交易。
🎮 命令
| 命令 |
描述 |
/shopkeep |
在你所在的位置生成默认的村民商店守卫。 |
/shopkeep type <entity> |
生成特定实体的商店守卫(例如 wandering_trader, zombie_villager)。 |
/shopkeep delete <name> |
删除商店守卫并移除其 YAML 文件。 |
/shopkeep movehere <name> |
将商店守卫传送到你当前位置。 |
/shopkeep tp <name> |
将你传送到商店守卫的位置。 |
/shopkeep rename <name> <newName> |
重命名商店守卫并更新其 YAML 文件名。支持颜色代码(&)。 |
/shopkeep changetype <name> <type> |
更改现有商店守卫的实体类型并使其重生。 |
/shopkeep reload |
重载插件 |
🔐 权限
| 权限 |
默认值 |
描述 |
shopkeeperplus.admin |
op |
访问 /shopkeep 命令。 |
shopkeeperplus.editor |
op |
通过 Shift + 右键点击 访问编辑器 GUI。 |
🛠️ 使用方法
管理员(创建商店)
- 站在你想要放置商店守卫的位置。
- 输入
/shopkeep(或 /shopkeep type <entity>)。
- Shift + 右键点击 商店守卫以打开编辑器。
- 在顶部槽位放置你想要的结果物品。
- 放置所需的成本 1(中间)和成本 2(底部)物品。
- 关闭 GUI 以保存交易。
- 使用下一页箭头添加更多交易。
玩家(交易)
- 右键点击 商店守卫以打开商店 GUI。
- 浏览交易(使用箭头切换页面)。
- 点击交易以从你的库存中自动填充成本物品。
- 点击结果物品进行购买。你可以快速点击多次购买!
📂 配置
该插件不需要手动配置。所有数据都是动态生成和管理的:
plugins/ShopKeeperPlus/shopdata/ - 包含每个商店守卫的 .yml 文件。
- 交易、装备和物品使用 Base64 进行安全序列化,以保留所有 NBT/DataComponent 数据。
ShopKeeperPlus
Report ➚
A highly customizable, fully-featured Shopkeeper plugin for PaperMC. It allows you to create custom entities (Villagers, Wandering Traders, Zombie Villagers) with completely custom trades, equipment, and behaviors, without relying on the vanilla Minecraft merchant limitations.
📌 Compatibility
- Platform: PaperMC (and forks like Purpur / Pufferfish)
- Minecraft Version: 1.20.5+ up to 26.3+
- Java Version: Java 21 or higher (Java 25 recommended for Paper 26.1+)
🚀 Features
1. Custom Entity Shopkeepers
- Spawn Villagers, Wandering Traders, or Zombie Villagers as shopkeepers.
- Baby Support: Unlike vanilla Minecraft, babies can trade!
- Badge Color: Change the Villager's badge color (Level 1-5) independently of their profession.
- Profession & Biome: Change the Villager's profession and biome (Villager Type).
- Equipment Editor: Give your shopkeeper custom armor, weapons, or items in their head, chest, legs, feet, main-hand, and off-hand.
- Custom Names: Rename the shopkeeper using color codes (
&). The name is hidden by default but appears on hover/gaze.
- Look at Player: The shopkeeper dynamically rotates its head to look at nearby players (ignores players in Vanish mode).
- WorldGuard Bypass: Spawns successfully even in regions with
mob-spawning: deny.
2. Advanced Trade Editor GUI
- Open the editor by Shift + Right-Clicking a shopkeeper.
- 9 Trades per page, up to 20 pages (180 custom trades per shop).
- Vertical Layout: Result (top), Cost 1 (middle), Cost 2 (bottom).
- DataComponent Protection: Items are saved and strictly checked using Base64 byte serialization. Mismatched NBT/DataComponent items (e.g., items with different lore or enchantments) will be rejected.
- No Item Glitching: Empty slots are handled perfectly without items "jumping" to other slots.
3. Custom Shop GUI
- A custom-built GUI that mimics the vanilla Minecraft merchant GUI but is not bound by vanilla restrictions.
- Auto-Fill: Clicking a trade automatically moves the required items from your inventory into the cost slots.
- Fast Trade: Buying an item instantly refills the cost slots from your inventory, allowing for rapid consecutive purchases.
- Anti-Duplication: If you don't have enough items, a gray glass pane preview is shown, and trading is blocked to prevent item duplication.
- Strict Trading: Trades are cancelled if the items provided do not exactly match the required DataComponents.
4. Data & Protection
- YAML Storage: Every shopkeeper is saved safely in
plugins/ShopKeeperPlus/shopdata/<random_name>.yml.
- Auto-Respawn: Shopkeepers automatically respawn at their saved locations after a server restart or plugin reload.
- Orphan Cleanup: Ghost entities are automatically removed on chunk load.
- Invulnerability: Shopkeepers are immune to all damage (fire, explosion,
/kill, /killall) and cannot be pushed.
- Open/Closed Status: Temporarily disable trades for specific shopkeepers using a toggle in the editor (Green/Red Banner).
🎮 Commands
| Command |
Description |
/shopkeep |
Spawns a default Villager shopkeeper at your location. |
/shopkeep type <entity> |
Spawns a specific entity shopkeeper (e.g., wandering_trader, zombie_villager). |
/shopkeep delete <name> |
Deletes the shopkeeper and removes its YAML file. |
/shopkeep movehere <name> |
Teleports the shopkeeper to your current location. |
/shopkeep tp <name> |
Teleports you to the shopkeeper's location. |
/shopkeep rename <name> <newName> |
Renames the shopkeeper and updates its YAML filename. Supports color codes (&). |
/shopkeep changetype <name> <type> |
Changes the entity type of an existing shopkeeper and respawns it. |
/shopkeep reload |
Reload the plugin |
🔐 Permissions
| Permission |
Default |
Description |
shopkeeperplus.admin |
op |
Access to the /shopkeep command. |
shopkeeperplus.editor |
op |
Access to open the Editor GUI via Shift + Right-Click. |
🛠️ How to Use
For Admins (Creating a Shop)
- Stand where you want the shopkeeper.
- Type
/shopkeep (or /shopkeep type <entity>).
- Shift + Right-Click the shopkeeper to open the Editor.
- Place your desired Result in the top slot.
- Place the required Cost 1 (middle) and Cost 2 (bottom) items.
- Close the GUI to save the trade.
- Use the Next Page arrow to add more trades.
For Players (Trading)
- Right-Click the shopkeeper to open the Shop GUI.
- Browse through the trades (use the arrows to change pages).
- Click on a trade to auto-fill the cost items from your inventory.
- Click the Result item to purchase. You can click rapidly to buy multiple times!
📂 Configuration
The plugin does not require manual configuration. All data is dynamically generated and managed:
plugins/ShopKeeperPlus/shopdata/ - Contains the .yml files for each shopkeeper.
- Trades, equipment, and items are serialized safely using Base64 to preserve all NBT/DataComponent data.
评论 0
登录后参与评分
还没有评论,来抢沙发吧