gold.mcfunction 469 B

123456789
  1. # as player
  2. execute store result score #bonus_gold mem run data get storage item:bonus item.tag.bonus_gold
  3. # 更改积分
  4. scoreboard players operation @s gold += #bonus_gold mem
  5. scoreboard players operation @s gold_total += #bonus_gold mem
  6. # 显示提示
  7. tellraw @a ["",{"text": ">> ","color":"aqua","bold": true},{"selector": "@s","color":"aqua"}," 获得了 ",{"score": {"name": "#bonus_gold","objective": "mem"},"color":"aqua"},{"text": " 金粒","color":"aqua"}]