|
首先给玩家第9格物品栏上一个红标雪球:replaceitem entity @a slot.hotbar 8 snowball 2 0 {"minecraft:item_lock":{"mode":"lock_in_slot"}}
然后给距离雪球最近的玩家雪球菜单计分板加一分:/execute @e[type=snowball] ~~~ scoreboard players add @p "雪球菜单" 1
接着给雪球菜单计分板X~Y的玩家计分板设到0:/execute @a[scores={"雪球菜单"=X..Y}] ~~~ scoreboard players set @s "雪球菜单" 1(X和Y是你自己调的
给低头的玩家雪球菜单计分板调到0:scoreboard players set @a[rxm=88] 雪球菜单 0
给距离雪球最近的玩家播放声音:execute @e[type=snowball] ~ ~ ~ playsound random.orb @p
然后是清除雪球:kill @e[type=snowball]
可能没有那么详细,请见谅 |
|