跳到主要内容

消耗品

item:
uniqueId: "消耗品测试"
display:
material: APPLE
name: '&f大型生命药剂'
lore:
- '&6神圣掉落物'
- ' '
- '&f物品描述'
- ' '
- ' &b瞬间生命恢复 &f30'
- ' '
- ' &7能够瞬间恢复生命的大型药剂.'
- ' '
actions:
RIGHT_CLICK:
- condition: '!hasCooldown'
action:
- "tell: &6成功使用..."
# 修改生命值
- "script: player.setHealth(Math.min(player.getHealth() + 30, player.getMaxHealth()))"
- "sounds: ENTITY_EXPERIENCE_ORB_PICKUP-1-2"
# 执行玩家指令
#- "command: spawn"
# 执行控制台指令
#- "console: say 控制台命令"
- "设置冷却: 40"
- "消耗数量: 1"
- "更新物品"
deny:
- 'tell: &cCD中...'
- '取消事件'