雪球菜單,指令我會(huì)做成筆記發(fā)給大家

雪球菜單
/gamerule commandblockoutput false
/scoreboard objectives add 雪球菜單 dummy
/tickingarea add circle ~~~ 2 指令區(qū)
雪球菜單運(yùn)行:
replaceitem entity @a slot.hotbar 8 destroy snowball 2 0 {"minecraft:item_lock":{"mode":"lock_in_slot"}}
一
execute @e[type=minecraft:snowball] ~ ~ ~ scoreboard players add @p 雪球菜單 1
Execute @e[type=snowball] ~ ~ ~ playsound random.orb @p
kill @e[type=snowball]
execute @a[scores={雪球菜單=7}] ~ ~ ~ scoreboard players set @s 雪球菜單 1
2
scoreboard players set @a[rxm=80,scores={雪球菜單=!0}] 雪球菜單 0
title @a[rxm=80] actionbar §l§4 菜單已取消
3.execute @a[scores={雪球菜單=1..6}] ~~~ titleraw @s actionbar {"rawtext":[{"text":"§l§b純生存服務(wù)器\n==================§e\n"},{"translate":"%%2","with":{"rawtext":[{"selector":"@s[scores={雪球菜單=1}]"},{"text":" §6"},{"text":" §e"}]}},{"text":"①傳送主城\n"},{"translate":"%%2","with":{"rawtext":[{"selector":"@s[scores={雪球菜單=2}]"},{"text":" §6"},{"text":" §e"}]}},{"text":"②原地去世\n"},{"translate":"%%2","with":{"rawtext":[{"selector":"@s[scores={雪球菜單=3}]"},{"text":" §6"},{"text":" §e"}]}},{"text":"③生存模式\n"},{"translate":"%%2","with":{"rawtext":[{"selector":"@s[scores={雪球菜單=4}]"},{"text":" §6"},{"text":" §e"}]}},{"text":"④設(shè)重生點(diǎn)\n"},{"translate":"%%2","with":{"rawtext":[{"selector":"@s[scores={雪球菜單=5}]"},{"text":" §6"},{"text":" §e"}]}},{"text":"⑤發(fā)起傳送\n"},{"translate":"%%2","with":{"rawtext":[{"selector":"@s[scores={雪球菜單=6}]"},{"text":" §6"},{"text":" §e"}]}},{"text":"⑥接受傳送\n"},{"text":"§a抬頭確定? §c低頭取消?\n\n\n\n"}]}
4
tp @a[scores={雪球菜單=1},rx=-88] 主城坐標(biāo)
execute @a[scores={雪球菜單=1},rx=-88] ~ ~ ~ title @s title §l§b歡迎回到主城
execute @a[scores={雪球菜單=1},rx=-88] ~ ~ ~ scoreboard players set @s 雪球菜單 0
5
kill @a[scores={雪球菜單=2},rx=-85]
execute @a[scores={雪球菜單=2},rx=-88] ~ ~ ~ title @s title §l§b去世成功
scoreboard players set @a[scores={雪球菜單=2},rx=-85] 雪球菜單 0
6
gamemode 0 @a[scores={雪球菜單=3},rx=-88]
execute @a[scores={雪球菜單=3},rx=-88] ~ ~ ~ title @s title §l§b切換成功
scoreboard players set @a[scores={雪球菜單=3},rx=-85] 雪球菜單 0
7
spawnpoint @a[scores={雪球菜單=4},rx=-85]
execute @a[scores={雪球菜單=4},rx=-88] ~ ~ ~ title @s title §l§b設(shè)置成功
scoreboard players set @a[scores={雪球菜單=4},rx=-85] 雪球菜單 0
8
title @a[rx=-80,scores={雪球菜單=5}] title §l§6發(fā)起傳送成功,等到同意中
title @a[rx=-80,scores={雪球菜單=5}] subtitle §l§e一分鐘無(wú)人同意自動(dòng)取消
say §l§4玩家§l§3@a[rx=-80,scores={雪球菜單=5}]§l§6發(fā)起了傳送§l§e打開(kāi)雪球菜單接受傳送即可將其傳送過(guò)來(lái)。
tag @a[rx=-80,scores={雪球菜單=5}] add 傳送
scoreboard players set @a[scores={雪球菜單=5},rx=-85] 雪球菜單 0
9
tp @a[tag=傳送] @a[rx=-80,scores={雪球菜單=6}]
say §l§e已將 §l§d@a[tag=傳送] §l§a傳送至 §l§b@a[rx=-80,scores={雪球菜單=6}]
tag @a remove 傳送
scoreboard players set @a[scores={雪球菜單=6},rx=-85] 雪球菜單 0
tag @a remove 傳送