refresh_equip.mcfunction 1.5 KB

12345678910111213141516171819202122232425
  1. # 刷新单个玩家购买的物品
  2. clear @s wooden_shovel
  3. clear @s stone_shovel
  4. clear @s iron_shovel
  5. give @s[scores={shop_weapon=1}] wooden_shovel{display:{Name:'{"text":"木锹","italic":false,"color":"gray"}'}}
  6. give @s[scores={shop_weapon=2}] stone_shovel{display:{Name:'{"text":"石锹","italic":false,"color":"gray"}'}}
  7. give @s[scores={shop_weapon=3}] iron_shovel{display:{Name:'{"text":"铁锹","italic":false,"color":"gray"}'}}
  8. clear @s potion
  9. give @s[scores={shop_potion=1}] potion{CustomPotionEffects:[{Id:1,Amplifier:0,Duration:400}],CustomPotionColor:8039610,display:{Name:'{"text":"喷溅型速度药水","italic":false,"color":"gray"}'}}
  10. clear @s golden_apple
  11. give @s[scores={shop_apple=1}] golden_apple{display:{Lore:['{"text":"恢复 4 颗心或生命 +1","italic":false,"color":"gray"}'],Name:'{"text":"生命果","italic":false,"color":"green"}'}}
  12. clear @s arrow
  13. give @s[scores={shop_arrow=1}] arrow 2
  14. give @s[scores={shop_arrow=2}] tipped_arrow{Potion:"minecraft:slowness"} 3
  15. replaceitem entity @s armor.head air
  16. replaceitem entity @s[scores={shop_armor=1}] armor.head leather_helmet{display:{Name:'{"text":"皮革帽子","italic":false,"color":"gray"}'}}
  17. replaceitem entity @s armor.chest air
  18. replaceitem entity @s[scores={shop_armor=3}] armor.chest leather_chestplate{display:{Name:'{"text":"皮革外套","italic":false,"color":"gray"}'}}
  19. replaceitem entity @s armor.legs air
  20. replaceitem entity @s[scores={shop_armor=2}] armor.legs leather_leggings{display:{Name:'{"text":"皮革裤子","italic":false,"color":"gray"}'}}