使用传统的基于告示牌的商店时,玩家必须传送至商店、找到所需的告示牌,并花费大量时间仅购买一件物品。然而,使用 Shop Menu 插件,你只需为商店提供一个 GUI,玩家即可在任何地方访问它!
新增:已添加附魔支持!
如何使用 Shop Menu
此插件非常简单易用且交互性强。你只需输入 /shop,菜单就会弹出。我已经预置了一些示例物品,因此你会看到它们列在菜单中。要购买物品,只需右键点击即可获得。想要多个物品?多次点击即可!要出售物品,请点击 GUI 菜单右上角的压力板,这将带你进入出售页面。同样,操作方式相同:右键点击以出售物品。
添加新物品非常简单且高度可配置。所有说明均在配置文件中。你可以设置物品的价格、描述(lore)、名称和数据值。
命令与权限
| 命令 | 功能 | 权限 |
| /shop | 打开商店 GUI | shop.use |
| /rs | 重载配置文件 | shop.reload |
配置文件
配置文件中的所有内容都有注释。但这里有几个关键提醒:
- 请确保不要将物品槽位设置为 0-8 或高于 54 的数字。
- 请勿使用制表符(Tab)
- 如果出现内部异常错误,是因为你没有遵循 YAML 的规则(例如未使用引号、使用了制表符等)。
- 如果你犯了错误且无法找出问题所在,请停止服务器,删除 kShop.jar 和文件夹,放入新的 kShop.jar 并启动服务器。
- 前往 Bukkit 的材质页面 查看 'item-name' 下需要填写的所有材质名称
- 槽位编号参考(0-8 标红表示不可用):
- 如果你想使用附魔功能且不想删除配置文件,请阅读以下内容:
添加此行:
enchantments: <附魔ID>:<等级>
附魔 ID 必须是数字。如有需要,请参考 附魔 ID 列表。
放在你的物品名称下方的任意位置。示例:
buy:
item1:
item-id: 310:0:20.5:9:&cDiamond Helmet
enchantments: '0:1'
item-lore:
- '&bRightclicktobuy!'
- '&4$20.5'
附魔 ID 必须是数字。如有需要,请参考 附魔 ID 列表。
教程
以下是我制作的一个视频。如果你制作了比这个更好的视频,我可能会将其放在这里:
依赖项
此插件需要 Vault 和一个经济类插件(如 Essentials、iConomy 等)。
遇到问题怎么办!
似乎很多人都在正确配置配置文件方面遇到问题,因此我将在此消除一些困惑:
- 你必须必须在 item-id 部分包含所有参数。你不能因为不使用某项就将其省略。
- 再次强调,格式如下:
item-id: ID:数据值:价格:槽位:名称
- 如果你不想添加任何附魔,请完全移除 'enchantments' 行。
- 我知道存在一个 bug,即我的原始物品仍然保留在那里。我已经修复了此问题,正在等待文件审核通过。目前,只需执行 /rs 即可修复商店。(每次重载/重启服务器时都会发生这种情况)。
- 如果插件甚至无法启动,你可能没有最新版本的 Vault 或经济类插件。
- 我不会回复任何已在本文档中解决过的“bug 报告”。我知道配置文件有点令人困惑,但它允许极高的可配置性并保持简洁。
横幅由 mrgameguideguys 制作 :)
有问题?随时给我发私信或留下评论。
发现 bug?请报告,我将尽快修复!
有想法想添加到这个插件中吗?在下面评论或给我发私信!
With a normal, sign-based shop, players have to teleport to the shop, find the sign they want, and spend lots of time for just one item. With the Shop Menu plugin, however, you can just have a GUI for your shop that players can access from anywhere!
NEW: Added enchantments support!
How to use Shop Menu
This plugin is very simple to use and very interactive. All you have to so is type /shop and then a menu will pop up. I have already put some example items there so you will see those listed there. To buy an item, simply right click it and you will get it. Want multiple items? Click it more than once! To sell items, click the pressure plate on the top right side of the GUI menu which will take you to the sell page. Again, same process: right click to sell an item.
Adding new items is very simple and very configurable. All the notes will be in the config. You can she price, lore, name, and the data value of an item.
Commands and Permissions
| Command | Function | Permission |
| /shop | Opens up the shop GUI | shop.use |
| /rs | Reloads the config | shop.reload |
The Config
Everything in the config is commentated. But here are a few critical reminders:
- Make sure you do not put 0-8 or anything higher than 54 for the item slot.
- Do not use tabs
- If you get an internal exception error, it's because you did not follow YAML's rules (didn't put quotations, used tabs, etc.)
- If you make a mistake and can't spot the error, stop the server, delete the kShop.jar and folder, put a new kShop.jar and start your server.
- Go to Bukkit's Material Page to see all the material names that need to go under 'item-name'
- Slot number reference (0-8 are red because you can't use them):
- If you want to use the enchantments aspect and don't want to delete you config, red this:
Add this line:
enchantments: <enchantmentID>:<level>
The enchantment ID MUST be a number. Refer to the Enchantment ID List if you need to.
somewhere under your items name. Example:
buy:
item1:
item-id: 310:0:20.5:9:&cDiamond Helmet
enchantments: '0:1'
item-lore:
- '&bRightclicktobuy!'
- '&4$20.5'
The enchantment ID MUST be a number. Refer to the Enchantment ID List if you need to.
Tutorials
The following is a video made by me. If you make a better video that this one, I just may put yours here:
Dependencies
This plugin requires Vault and an economy plugin (Essentials, iConomy, etc.)
If You're Having Trouble!
A lot of people seem to be having problems with setting up the config correctly, so I will try to eliminate the confusions here:
- You MUST MUST MUST have all the parameters in the item-id section. You CAN'T just leave something out because you're not using it.
- Again, it goes like this:
item-id: THE_ID:DATA_VALUE:PRICE:SLOT:NAME
- If you don't want to add any enchantments, remove the 'enchantments' line completely.
- I understand that there is a bug where my original items still stay there. I have fixed this and I'm waiting for the file to get approve. For now, just do /rs and that should fix the shop. (this happens every time you reload/restart the server).
- If the plugin doesn't even start up, you probably don't have the latest version of Vault or an economy plugin.
- I won't be responding to any "bug reports" that have been addressed here. I know that the config is a bit confusing but it allows for extreme configuration and keeps it very concise.
Banner made by mrgameguideguys :)
Have questions? Feel free to PM me or leave a comment.
Found a bug? Report it and I will fix it ASAP!
Have ideas for things I could add to this plugin? Comment down below or PM me!
评论 0
登录后参与评分
还没有评论,来抢沙发吧