join_watch.mcfunction 667 B

123456789101112
  1. # 物品
  2. clear @s lime_dye{lobby_item:1b}
  3. clear @s gray_dye{lobby_item:1b}
  4. kill @e[type=item,nbt={Item:{id:"minecraft:lime_dye",tag:{lobby_item:1b}}}]
  5. execute if data entity @s Inventory[{Slot:1b}] run scoreboard players set @s item_slot 1
  6. execute if data entity @s Inventory[{Slot:1b}] at @s run function item:pop_slot/return_item
  7. replaceitem entity @s hotbar.1 gray_dye{lobby_item:1b,display:{Name:'[{"text":"","color":"white","italic":false},"旁观模式 (按 ",{"keybind":"key.drop"}," 准备)"]',Lore:['[{"text":"","color":"gray","italic":false},"你将在下一局旁观游戏"]']}}
  8. execute at @s run function lib:sounds/hit2
  9. # 队伍
  10. team join hub_watch @s