不要忘记命名空间!
不要忘记为你所有配置设定一个命名空间!
启用
通过该设置,你可以完全禁用一个物品。
如果玩家背包中有这个物品,它不会被移除。
对于方块也一样,但在被破坏时不会掉落任何物品。
物品名
这是玩家会看到的物品名。
权限
permission_suffix: myitem
描述
lore:
- '&7When you mine a block'
- '&7it drops exp orbs'
- '&750% of times.'
每行都是一行物品描述。
附魔
enchants:
- ARROW_FIRE:1
- anger_artifact:1
- my_custom_plugin:custom_enchant:6
物品的附魔。
你可以设置原版附魔以及其他插件的自定义附魔(如 EcoEnchants, GoldenEnchants...)。
也支持命名空间(如果你使用了命名空间来创建自定义附魔)
属性修饰符
attribute_modifiers:
mainhand:
attackDamage: 19
attackSpeed: 1.1
maxHealth: 1.1
movementSpeed: -1
armor: 1.1
armorToughness: 1.1
attackKnockback: 1.1
luck: 1.1
offhand:
attackDamage: 19
attackSpeed: 1.1
maxHealth: 1.1
movementSpeed: 1.1
armor: 1.1
armorToughness: 1.1
attackKnockback: 1.1
luck: 1.1
这些是原版的属性修饰符,你可以在这里查看详情。
耐久
durability:
max_custom_durability: 200
custom_durability: 32
disappear_when_broken: false
unbreakable: false
usages: 5
这无需多言。
usages
是一个特殊的属性,允许你为该物品设定特定的使用次数。记得使用事件来减少它(查看事件教程)。
custom_durability
是物品被制作出来时的耐久(如未指定,与 max_custom_durability
相同)
max_custom_durability
是物品的最大耐久值
物品标记
item_flags:
- HIDE_ATTRIBUTES
- HIDE_DESTROYS
- HIDE_ENCHANTS
- HIDE_PLACED_ON
- HIDE_POTION_EFFECTS
- HIDE_UNBREAKABLE
特定的物品标记可以隐藏一些原版信息。
你可以在此找到详细信息:https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/ItemFlag.html
方块附魔(blocked_enchants)
禁止将特定附魔添加至物品的特殊属性,玩家无法将对应附魔添加至该物品。
blocked_enchants:
- DAMAGE_UNDEAD
- DAMAGE_ALL
- DAMAGE_ARTHROPODS
- KNOCKBACK
- DURABILITY
- SWEEPING_EDGE
blocked_enchants:
- ALL
以玩家状态为基础的事件(events_needed_player_stats)
仅当玩家状态(ItemsAdder 状态,通常以 HUD 显示)满足设定条件时才执行事件的特殊属性。
你可以将其设置为 >
, <
与 =
示例:
magic_wand:
display_name: "Magic wand"
permission: magic_wand
resource:
material: DIAMOND_SWORD
generate: true
textures:
- item/example_item.png
durability:
max_custom_durability: 512
attribute_modifiers:
mainhand:
attackDamage: 0.1
blocked_enchants:
- ALL
events_needed_player_stats:
mana: ">0" ### <---- for example. You could also set it to <5 or =1 for example.
events:
interact:
entity:
target_potion_effect:
type: GLOWING
duration: 70
amplifier: 15
decrement_player_stat:
name: mana
amount: 1
发光(glow)
当物品掉落到地上时,你可以让其发光。
对珍稀物品很有用.
示例:
items:
glowing_item:
display_name: Glowing Item
resource:
material: DIAMOND
generate: true
textures:
- item/glowing_item.png
drop:
glow:
enabled: true
color: DARK_RED
显示名字(show_name)
你可以让掉落物显示名字。
对于珍稀物品很有用。
示例:
glowing_item:
display_name: Glowing Item
resource:
material: DIAMOND
generate: true
textures:
- item/glowing_item.png
drop:
show_name: true
模板(template)
变种(variant_of)
使用官方编辑器读取所有属性