player_enter.mcfunction 741 B

123456789101112131415161718192021222324
  1. # 单个玩家开始小游戏时执行
  2. function lib:sounds/music/mini_middle
  3. title @s clear
  4. title @s actionbar ""
  5. # 状态效果
  6. effect clear @s
  7. effect give @s saturation 1000000 0 true
  8. effect give @s instant_health 10 0 true
  9. gamerule naturalRegeneration false
  10. effect give @s night_vision 1000000 0 true
  11. # 传送玩家
  12. tp @s[tag=!debug] 1015.79 7.01 7009.40
  13. # 调整模式
  14. gamemode spectator @s[tag=!debug]
  15. gamemode adventure @s[tag=!watcher,tag=!rejoining,tag=!debug]
  16. # 重新加入处理
  17. execute if entity @s[tag=rejoining] run function mini:slime/player_failed
  18. # 给予物品
  19. replaceitem entity @s hotbar.8 stick{GameItem:1b,Enchantments:[{id:"knockback",lvl:1}],Unbreakable:1b,display:{Name:'{"text":"击退棒","italic":false}'}} 1