锁定合成
一个 Paper 插件
如果你在 Paper 服务器上使用此插件,
你可以设置某些合成配方仅在背包中设置了所需物品时才生效。
默认情况下,在尝试合成被锁定的配方后,
它会告诉你缺少哪些物品,以及你拥有哪些必需物品。
你可以选择停止显示其中一项或两项信息。
一些用途:
此插件的一个用途是控制强力物品的获取流程,例如战锤(mace)。你可以选择一个服务器上唯一的物品(要么是龙蛋,要么是你给予某人的仅创造模式物品),并将其作为该配方的使用限制。这是一种让这些稀有但无用的物品发挥作用的办法,同时也能限制玩家的力量增长。如果服务器上有经济插件和某种形式的交易(例如拍卖行),被锁定的物品和密钥都可能卖出高价。
你也可以使用此插件将物品锁定在难以获得的物品之后,例如用下界合金块来解锁长矛,这样即使丢失或损坏了也不需重新获取。
如何配置消息
要配置此插件,请进入你的服务器目录,然后前往:
/plugins/LockedCrafting/config.yml
在 config.yml 文件中,有一个名为 messages 的部分。
你可以在此进行配置。
缺失要求 (messages.missingReqs)
当玩家尝试合成物品但被此插件阻止时,
玩家会在聊天栏收到一条告知原因的消息。
你可以在 messages.missingReqs 下自定义此消息
消息格式如下:
- 发送 pre 部分的消息
- 如果 sayMissing 设置为 true,它会告诉玩家他们缺少哪些物品,每个物品占一行
- 发送中间部分的消息
- 如果 sayThere 设置为 true,它会告诉玩家他们拥有哪些必需物品,每个物品占一行。
如何配置锁定配方
要配置此插件,请进入你的服务器目录,然后前往:
/plugins/LockedCrafting/config.yml
在 config.yml 文件中,有一个名为 recipes 的部分。这是修改配方要求的方法。
配方
每个配方需要两层 YAML 代码。
第一层是配方的命名空间。在大多数情况下,这个命名空间是 minecraft,
如果是这种情况,你可以省略命名空间,只使用配方名称(如默认配置中的 diamond_spear 配方所示)。
如何查找配方名称
当你将配方放入合成网格时,日志会显示:
Crafting recipe namespace:key
你可以利用这一点来找到配方的名称
如果命名空间不是 minecraft,外层是命名空间,内层是键(key),也称为名称。
即使是 minecraft 命名空间,也可以这样做,如默认配置中的 mace 配方所示。
要求
在配方下方,有一个名为 itemReqs 的列表。
数组中的每个元素对应制作该配方所需的物品之一。
列表可以使用方括号格式化,如 diamond_spear 示例所示,也可以使用短横线格式化,如 mace 示例所示。
Locked Crafting
A paper plugin
If you use this plugin in your paper server,
you can make some crafting recipes only work if you have
set required items in your inventory.
By default, after trying to craft a locked recipe,
it will tell you what items you are missing,
and what required items you have.
You can stop it from telling you either or both of these.
Some Uses:
One use for this plugin is to control the flow of powerful items, such as the mace. You would choose an item there is only one of on the server (either the dragon egg or a creative-only item you give to someone), and lock the use to that. That would be a way to give these rare but useless items a use, and keep players' power in check. If there is an economy plugin and some form of trade (such as an auction house), both the locked item and the key could sell for lots of money.
You could also use this plugin to lock items behind hard-to-get items, such as a spear behind a netherite block, without requiring you to do all that again if you lose it or it breaks.
How To Configure Messages
To configure this plugin, go to your server directory, then go to:
/plugins/LockedCrafting/config.yml
In the config.yml file, there is a section called messages.
You can configure these.
Missing Requirements (messages.missingReqs)
When a player tries to craft an item but is blocked by this plugin,
the player will be sent a message in chat telling them why.
You can configure this message however you want, under messages.missingReqs
The message goes like this:
- It sends the message in pre
- If sayMissing is set to true, it tells the player what items they are missing, with each item separated by a new line
- It sends the message in between
- If sayThere is set to true, it tells the player what required items they have, with each item separated by a new line.
How to Configure Locked Recipes
To configure this plugin, go to your server directory, then go to:
/plugins/LockedCrafting/config.yml
In the config.yml file, there is a section called recipes. This is how you change recipe requirements.
Recipes
Each recipe takes two layers of YAML code.
The first layer is the namespace of the recipe. In most cases, this namespace is minecraft,
so if this is the case you can omit the namespace and just use the recipe name (as shown in the diamond_spear recipe in the default).
How to find recipe names
When you put a recipe in the crafting grid, the logger will say:
Crafting recipe namespace:key
You can use this to find the name of a recipe
If the namespace isn't minecraft, the outer layer is the namespace and the inner layer is the key, also known as the name.
You can do this if the namespace is minecraft, as well, as shown by the mace recipe in the default.
Requirements
Under a recipe, there is a list called itemReqs.
Each element in the array corresponds to an item you need to have in order to craft this recipe.
Lists can be formatted in square brackets, like the diamond_spear example, or with dashes, like the mace example.
评论 0
登录后参与评分
还没有评论,来抢沙发吧