描述
功能简介
本插件会在物品被创建、附魔或合成时,将其名称重置为配置文件中设定的自定义名称。
命令
权限
Auto-Rename.ReloadConfig:允许重新加载配置的权限
工作原理
当玩家创建、附魔或合成物品时,如果该物品在配置文件中存在定义,其名称将被重置。
在合成或合并物品时,只有将物品从结果栏取出后,名称才会正确显示。
配置说明
物品使用 Bukkit API 中的材质名称,这意味着所有名称均为大写且不含空格。例如,钻石剑的名称为 DIAMOND_SWORD。
在每个物品下方可以有一个名为 default 的部分。这是物品创建时的默认名称,或者当附魔不匹配任何其他类别时使用的名称。此部分为可选。如果未设置,则将使用物品的原始名称。
对于数据值(data value)不为 0 的物品,只需在该物品编号下添加一个名为 data 的部分,并在此处指定对应的数据值。这通常用于羊毛、染料或木材等物品。
若希望拥有特定附魔的物品显示不同的名称,需在数字外加单引号(例如 '1'),从 1 开始递增,对应您想要设置的任意多种附魔组合。在数字下方必须包含一个名为 enchantments 的部分。此处需使用 Bukkit API 中的附魔名称,后跟冒号和附魔等级。例如,力量 I 附魔应写为 ARROW_DAMAGE:1。对于带有这些附魔的物品名称,您需要在数字下方再添加一个名为 name 的分类,随后填写您想要的名称。
对于药水,您需要先指定 Bukkit API 中的药水类型,然后在下方指定药水等级。例如,速度 I 药水应写为 SPEED:,其下一行应为 '1': "您想要的名称"。
我在 Bukkit API 中反复提及的所有名称均位于静态公共属性(static public attributes)下。
此外,如果您希望名称由多个单词组成,必须用双引号或单引号将其括起来。颜色代码同样适用于名称。您需要使用 &# 来标识您想要的特定颜色。
默认配置文件中包含了上述所有内容的示例。
待办事项
已知问题
- 当您从熔炉库存的结果栏中取出物品时,如果名称已被更改,直到库存更新前,冶炼槽会显示为您取出的物品内容。
- 如果发现任何问题,请为此提交工单(ticket)。
Description
What it is
This plugin will rename configurable items to a configurable name when they are created, enchanted, or combined.
commands
- AR-Reload: Reloads the config
Permissions
Auto-Rename.ReloadConfig: permission to reload the config
- If anyone wants any for whatever reason just ask.
How it works
When someone creates, enchants, or combines items the name is reset if it is in the config.
when crafting or combining the name only shows up correctly after it is taken out of the result slot.
Config
The items use material names from the bukkit api so that means that it is all in caps without spaces, for instance a diamond sword is DIAMOND_SWORD
Under the item there can be a section called default. This is what it defaults to on creation and if the enchantments don't match any other category. This section is optional. If it isn't there then the normal name will be used.
For items with a different data value than 0 you just add a separate section under the item number called data then have the data value there. This would be used for something like wool or dyes or wood.
For items to have enchantments and have a different name you put a number with apostrophes around it (eg. '1') starting with 1 and going to how ever many different enchantment combos you want. Under the number you have to have a section called enchantments. This uses the name of enchantments in the bukkit api then a colon and the level of the enchantment. For instance fo a power 1 enchantment it would be ARROW_DAMAGE:1, for the name of the item with those enchantments you have to put another category under the number called name then the name goes after it.
For potions you have to put the potion type from the bukkit api then under it you put the level of the potion. For instance, for a speed 1 potion you would have to put SPEED: then under it would go '1': "name you want".
All of the names that I keep referring to in the bukkit api are under static public attributes.
Also if you want the name to be more than one word you have to put either quotes or apostrophes around it and color codes work for the names. You have to put &# to identify it as a certain color that you want.
I have examples of all of this in the default config.
To Do
- Anyone have any suggestions?
Known Bugs
- When you take something out of the result slot of the furnace inventory the smelting slot turns into whatever you took out if the name was changed until the inventory updates.
- If anyone finds any please create a ticket for it
评论 0
登录后参与评分
还没有评论,来抢沙发吧