自定义配方插件
版本: Paper/Spigot 1.21.5
作者: TomMustBe12
概述
Custom Recipes 让你能够直接在游戏内轻松创建自定义合成配方!使用 /recipe 命令打开一个强大且直观的图形界面(GUI),你可以制作在服务器重启后依然保留的自定义配方。这些配方完全兼容原版合成网格,使你和你无需任何外部工具或配置文件即可合成自定义物品。
功能特性
- 即时创建自定义配方:使用背包中的物品进行操作
- 配方持久保存:自动跨服务器重启保存
- 可在原版合成网格中合成——无需特殊的合成方块
- 简单的 GUI 界面用于构建和管理你的配方
- 基于权限的控制以限制谁可以创建配方
- 支持自定义 NBT 数据:可保存在输入或输出物品上,提供更多灵活性。
命令与权限
/recipe
- 打开自定义配方创建 GUI
- 需要权限:
customrecipes.set — 允许玩家创建和管理自定义配方
权限摘要
| 权限 |
描述 |
默认设置 |
customrecipes.set |
允许使用 /recipe 命令并管理自定义配方 |
仅限 OP |
注意: 只有拥有 customrecipes.set 权限的玩家才能创建或修改自定义配方。其他玩家仍然可以合成这些配方,但无法添加或删除它们。
如何使用自定义配方 GUI
- 运行命令
/recipe 以打开配方创建 GUI。
- GUI 左侧显示一个 3x3 合成网格,右下角为输出槽位。
- 放置材料:通过点击背包中的物品并将其拖入网格槽位来设置 3x3 网格中的原料。
- 设置输出物品:将结果物品放置在输出槽位中。
- 当输入材料和输出都设置好后,点击 “提交”按钮(绿色羊毛)以注册该配方。
- 该配方现已持久保存,任何人都可以使用原版合成桌进行合成!
- 请注意,在后续版本中,我将添加删除自定义配方的方式。目前,要删除配方,你必须在 config.yml 中删除对应的配方 ID。
补充说明
- 配方会自动保存到 config.yml 文件中;无需手动编辑配置文件。
- 你可以为相同的输出创建多个配方,所有配方都会被识别。但是,如果创建的配方已存在,它将覆盖原版的对应配方,并用新配方替换它。
示例用法
- 给自己权限或成为 OP:
/lp user YourName permission set customrecipes.set true(如果使用 LuckPerms)
- 运行
/recipe 打开 GUI。
- 放入任意组合的材料,例如:1 钻石 + 1 木棍。
- 将输出物品设置为钻石剑。
- 保存配方。
- 现在任何人都可以用仅 1 钻石和 1 木棍合成出钻石剑!
支持与贡献
如果发现错误或希望请求新功能,请在插件的 GitHub 页面上开启 Issue,或直接联系我 TomMustBe12。
Custom Recipes Plugin
Version: Paper/Spigot 1.21.5
Author: TomMustBe12
Overview
Custom Recipes lets you easily create your own crafting recipes directly in-game! Use the /recipe command to open a powerful, intuitive GUI that allows you to craft custom recipes that persist between server restarts. These recipes are fully compatible with the vanilla crafting grid, allowing you and your players to craft custom items without any external tools or config files.
Features
- Create custom recipes on the fly using items from your inventory
- Persistent recipes: saved across server restarts automatically
- Craftable in the vanilla crafting grid — no special crafting blocks needed
- Simple GUI interface to build and manage your recipes
- Permission-based control to restrict who can create recipes
- Custom NBT data saved on input or output items, allowing for more flexibility.
Commands & Permissions
/recipe
- Opens the custom recipe creation GUI
- Requires permission:
customrecipes.set — Allows the player to create and manage custom recipes
Permissions Summary
| Permission |
Description |
Default |
customrecipes.set |
Allows using /recipe command and managing custom recipes |
OP only |
Note: Only players with customrecipes.set permission can create or modify custom recipes. Others can still craft the recipes but cannot add or remove them.
How to Use the Custom Recipe GUI
- Run the command
/recipe to open the recipe creation GUI.
- The GUI shows a 3x3 crafting grid on the left, and an output slot on the bottom right.
- Place the ingredients in the 3x3 grid by clicking items from your inventory into the grid slots.
- Set the output item by placing the resulting item in the output slot.
- Once you have the input ingredients and output set, click the "Submit" button (green wool) to register the recipe.
- The recipe is now saved persistently and craftable by anyone using the vanilla crafting table!
- Please note that eventually in further versions I will create a way to delete custom recipes. Right now, to delete, you will have to delete the recipe id in the config.yml.
Additional Notes
- Recipes are saved to config.yml automatically; no manual config editing required.
- You can create multiple recipes for the same output, and all will be recognized. However, creating a recipe that already exists will overwrite the vanilla recipe and replace with the new recipe.
Example Usage
- Give yourself permission or be OP:
/lp user YourName permission set customrecipes.set true (if using LuckPerms)
- Run
/recipe to open the GUI.
- Put any combination of ingredients, for example: 1 diamond + 1 stick.
- Set the output item to a diamond sword.
- Save the recipe.
- Now anyone can craft a diamond sword using just a diamond and a stick!
Support & Contributions
If you find bugs or want to request features, please open an issue on the plugin’s GitHub page or contact me, TomMustBe12.
评论 0
登录后参与评分
还没有评论,来抢沙发吧