
简要概览
Wandering Merchants 为你的服务器引入了 RPG 风格的商人。与所有商店都局限于单一市场区域的固定位置不同,这些商人生成并自行在世界中漫游,在野外偶然遇到他们会让服务器世界显得更加生机勃勃。当玩家发现一名商人时,必须向其提供符合其性格特征的物品作为交换,随后该商人将允许玩家与其交互以浏览和购买商品。
Minecraft 版本与服务端软件
最新版本的插件基于 Paper 服务端构建,支持 Minecraft 26.3 至 1.21.9 版本。在其他服务端软件上可能可用也可能不可用。它应该能在 Purpur 和 Pufferfish 等 Paper 分支上运行,尽管尚未对其进行测试。
必需插件
- EconomyShopGUI:
- EconomyShopGUI 还需要一个经济类插件才能正常运行
- Citizens2: 并非所有 Citizens2 构建版本都支持 26.3 至 1.21.9,你必须根据 Minecraft 服务器的版本选择特定的构建版本:
- 26.3, 26.2, 26.1.2, 26.1.1: (latest)
- 1.21.11:
- 1.21.10, 1.21.9:
设置指南
-
确保玩家的权限 economyshopgui.shop 和 economyshopgui.sellgui.all 被设置为 false。这样可以防止玩家通过命令(如 /shop)直接进行交易,否则玩家就没有必要特意去找商人购买或出售物品了。
-
确保在 EconomyShopGUI 的配置中将 direct-shop-command-console 设置为 true。这是因为如果玩家打开商店后可以使用返回按钮回到插件的主菜单,从而访问该商人本不应开放的其它商店。
底层原理
NPC 本身由 Citizens2 创建和控制。对于实际的买卖交易功能,本插件没有重新发明一套新的商店系统,而是让商人使用 EconomyShopGUI(直接接入你的服务器经济系统)来管理商店。这意味着与商人的交易使用你现有的游戏内货币,所有与商店相关的配置均可通过 EconomyShopGUI 的配置文件完成。未获得所需物品的商人会在一段时间后消失。
命令
-
/wm spawn <merchant id> [player] — 在你所在位置或另一名玩家的位置生成一名商人
/wm spawn sylphie 或 /wm spawn sylphie MahinBro
-
/wm give <merchant id> [player] — 将商人的专属物品给予你自己或另一名玩家
/wm give sylphie 或 /wm give sylphie MahinBro
-
/wm recipe <merchant id> [player] — 为你自己或另一名玩家打开商人商品的合成配方 GUI
/wm recipe sylphie 或 /wm recipe sylphie MahinBro
-
/wm get general_config — 查看通用配置的默认设置数据
-
/wm get worlds_config <world name> — 查看特定世界的配置数据
/wm get worlds_config world
-
/wm get merchants_config <merchant id> — 查看商人的配置数据
/wm get merchants_config sylphie
-
/wm get npc_data <npc id> — 查看本插件设置的 NPC 内部数据
-
/wm get item_data — 查看你主手所持物品由本插件设置的内部数据
-
/wm set npc_data <npc id> <field> <value|player|NULL> — 设置本插件使用的 NPC 内部数据
⚠️ 谨慎使用。 错误地修改商人 NPC 的内部数据可能导致意外问题。仅在你知道自己在做什么时使用此命令。
| 字段 |
描述 |
接受的值 |
示例 |
merchant_id |
配置文件中定义的商人 ID |
商人 ID,或 NULL |
/wm set npc_data 3 merchant_id sylphie |
merchant_variant |
当前商人 NPC 的状态 |
stray, stray_moving, shopkeeper, shopkeeper_moving,或 NULL |
/wm set npc_data 3 merchant_variant shopkeeper |
merchant_viewers |
当前正在查看此 NPC GUI 的玩家数量。仅适用于流浪者变体 |
整数,或 NULL |
/wm set npc_data 3 merchant_viewers 0 |
creation_time |
此 NPC 生成的时间戳 |
长整型整数,或 NULL |
/wm set npc_data 3 creation_time 1745000000000 |
following |
此 NPC 当前跟随的玩家 |
在线玩家名称,或 NULL 表示停止跟随 |
/wm set npc_data 3 following MahinBro |
使用 NULL 作为值可清除该字段。
-
/wm set item_data id <value|NULL> — 设置你主手所持物品的商人物品 ID
/wm set item_data id sylphie_scroll
⚠️ 谨慎使用。 即使对泥土设置物品 ID,也可能导致商人接受该物品;或者对真正的商人物品设置错误的物品 ID,会导致商人拒绝接受。仅在你知道自己在做什么时使用此命令。
-
/wm set item_data cmd <value|NULL> — 设置你主手所持物品的自定义模型数据
/wm set item_data cmd sylphie_grimoire
⚠️ 谨慎使用。 修改物品的自定义模型数据可能会导致其显示不同的纹理。仅在你知道自己在做什么时使用此命令。
权限
| 权限 |
描述 |
默认拥有者 |
wanderingmerchants.wm |
允许使用 /wm 命令 |
仅限操作员 |
多世界支持
你可以拥有多个世界,商人可以在这些世界中生成。你可以自定义哪些商人在哪些世界中生成,以及商人的生成频率。你还可以自定义商人在某个世界中生成的最低频率。下界和末地不受支持,仅支持主世界。阅读插件的默认配置文件以获取更多信息。
可选插件
- LuckPerms: (你可以使用任何你喜欢的权限管理插件)
- Vault 2.0: (你可以使用任何你喜欢的经济插件)
支持
如需支持或提问,请加入我的 Discord 服务器:
许可证
根据 Apache License 2.0 许可
其他项目
查看我在 上制作的其他有趣内容
备注
如果有人在意的话,游戏画面中使用的世界种子是 3353863628485365188(版本 26.3)。?

Brief Overview
Wandering Merchants brings RPG-style merchants to your server. Instead of every shop being in a fixed location like being confined to a single market area, these merchants spawn and roam the world on their own, and stumbling across one out in the wild make the server feel more alive. When a player finds a merchant, the player must give it an item specific to its personality and in return the merchant will allow the player to interact with it to browse and buy items.
Minecraft Version And Server Software
The latest version plugin was built for Minecraft versions between 26.3 and 1.21.9 running on Paper. It may or may not work on other server software. It should work on forks of Paper such as Purpur and Pufferfish, though it has not been tested on them.
Required Plugins
- EconomyShopGUI:
- EconomyShopGUI also requires an economy plugin to function properly
- Citizens2: Not all Citizens2 builds support 26.3 to 1.21.9, you must choose a specific build based on your Minecraft server's version:
- 26.3, 26.2, 26.1.2, 26.1.1: (latest)
- 1.21.11:
- 1.21.10, 1.21.9:
Setup Guide
-
Make sure that players have the permissions 'economyshopgui.shop' and 'economyshopgui.sellgui.all' set to false. This makes it so that players can make transactions through the merchants only otherwise why would players even bother to go to a merchant to buy or sell items when they can just do so using commands like /shop.
-
Make sure to set 'direct-shop-command-console' to 'true' in the EconomyShopGUI's config. This is because if a player were to open a shop, the player could just use the back button to go the main menu of the plugin and access all the other shops that the merchant was not supposed to give access to.
Under The Hood
The NPCs themselves are created and controlled through Citizens2. For the actual trading functionality of buying and selling, instead of reinventing a new shop system, the merchants use EconomyShopGUI (which directly plugs into your server's economy) for their shops mean transactions with the merchants uses your existing in-game currency meaning all shop related configuration can be done through EconomyShopGUI's config. Merchants that have not been given their desired items will disappear after a certain amount of time.
Commands
-
/wm spawn <merchant id> [player] — Spawn a merchant at your location or at another player's location
/wm spawn sylphie or /wm spawn sylphie MahinBro
-
/wm give <merchant id> [player] — Give a merchant's item to yourself or another player
/wm give sylphie or /wm give sylphie MahinBro
-
/wm recipe <merchant id> [player] — Open a merchant item's crafting recipe GUI for yourself or another player
/wm recipe sylphie or /wm recipe sylphie MahinBro
-
/wm get general_config — View the config data general settings
-
/wm get worlds_config <world name> — View the config data for a specific world
/wm get worlds_config world
-
/wm get merchants_config <merchant id> — View the config data of a merchant
/wm get merchants_config sylphie
-
/wm get npc_data <npc id> — View the internal data of a merchant NPC set by this plugin
-
/wm get item_data — View the internal data of the item in your main hand set by this plugin
-
/wm set npc_data <npc id> <field> <value|player|NULL> — Set the internal data in NPCs used by this plugin
⚠️ Use with caution. Incorrectly modifying internal data of a merchant NPC can lead to unexpected issues. Only use this command if you know what you are doing.
| Fields |
Description |
Accepted Values |
Example |
merchant_id |
The ID of a merchant defined in the config |
A merchant ID, or NULL |
/wm set npc_data 3 merchant_id sylphie |
merchant_variant |
The current state of the merchant NPC |
stray, stray_moving, shopkeeper, shopkeeper_moving, or NULL |
/wm set npc_data 3 merchant_variant shopkeeper |
merchant_viewers |
The number of players currently viewing this NPC's GUI. Only for stray variants |
An integer, or NULL |
/wm set npc_data 3 merchant_viewers 0 |
creation_time |
The timestamp of when this NPC was spawned |
A long integer, or NULL |
/wm set npc_data 3 creation_time 1745000000000 |
following |
The player this NPC is currently following |
An online player's name, or NULL to stop following |
/wm set npc_data 3 following MahinBro |
Use NULL as the value to clear the field.
-
/wm set item_data id <value|NULL> — Set the merchant item ID for the item in your main hand
/wm set item_data id sylphie_scroll
⚠️ Use with caution. Setting an item ID on even dirt can cause it to be accepted by a merchant, or setting an incorrect item ID on an actual merchant item can cause it to not be accepted by the merchant. Only use this command if you know what you are doing.
-
/wm set item_data cmd <value|NULL> — Set the custom model data of the item in your main hand
/wm set item_data cmd sylphie_grimoire
⚠️ Use with caution. Modifying the custom model data of an item may cause it to display a different texture. Only use this command if you know what you are doing.
Permissions
| Permission |
Description |
Who has it by default |
wanderingmerchants.wm |
Allows the use of /wm command |
Operators only |
Multi-World Support
You can have multiple worlds in which merchants can spawn in. You can customize which merchants can spawn in which worlds and how frequently should merchants spawn in a world. You can also customize how rarely a merchant can spawn in a world. Nether and the end are not supproted, only overworld worlds are supported. Read the default config file of the plugin for more information.
Optional Plugins
- LuckPerms: (you can use any permission manager plugin you like)
- Vault 2.0: (you can use any economy plugin you like)
Support
For support or questions, join my discord server:
License
Licensed under the Apache License 2.0
Other Projects
Check out other cool stuff I made at
Side Note
The world seed used in the gameplay images is 3353863628485365188 in version 26.3 if anyone cares 😄.
评论 0
登录后参与评分
还没有评论,来抢沙发吧