如图

  • 国际版基岩1.20.12
  • 看图
  • 注意命令方块方向,类型,和是否有条件
  • 最后是自己琢磨,不会也可以照抄
  • 改于老版本雪球菜单,命令格式已经个性设置

说在前面

没啥好说

注意就行,一般不会出错

功能实现需要先创建

/scoreboard objectives add 雪球菜单 dummy

命令方块有提示,会刷屏,可以关掉提示

对于部分权限管理对玩家使用tag标记来判断是否拥有权限

/tag @s add yn

/tag @s add op

两个标签分别表示是否可以使用异能增益和转为创造模式的权限

有点生草,可能开会有部分问题,希望各位能够告知(我也是刚摸索,不太会)

A

初始化雪球菜单的操作

1
replaceitem entity @a slot.hotbar 8 destroy snowball 2 0 {"minecraft:item_lock":{"mode":"lock_in_slot"}}
1
execute as @e[type=snowball] at @s run scoreboard players add @p[r=2] 雪球菜单 1
1
execute as @e[type=snowball] at @s run playsound random.orb @p[r=2]
1
execute as @a[scores={雪球菜单=1..}] at @s run kill @e[type=snowball,r=2]
1
execute as @a[scores={雪球菜单=8}] at @s run scoreboard players set @s 雪球菜单 1
1
execute as @a[scores={雪球菜单=!0},rxm=88] at @s run title @s actionbar §l§c已关闭菜单✘
1
execute as @a[scores={雪球菜单=!0},rxm=88] at @s run playsound minecraft:fire.ignite @s
1
execute as @a[scores={雪球菜单=!0},rxm=88] at @s run scoreboard players set @s 雪球菜单 0
1
execute as @a[scores={雪球菜单=1..7}] run titleraw @s actionbar {"rawtext":[{"text":"§l§b纯生存服务器\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":"④设重生点\n"},{"translate":"%%2","with":{"rawtext":[{"selector":"@s[scores={雪球菜单=5}]"},{"text":"   §6"},{"text":"    §e"}]}},{"text":"⑤发起传送\n"},{"translate":"%%2","with":{"rawtext":[{"selector":"@s[scores={雪球菜单=6}]"},{"text":"   §6"},{"text":"    §e"}]}},{"text":"⑥接受传送\n"},{"translate":"%%2","with":{"rawtext":[{"selector":"@s[scores={雪球菜单=7}]"},{"text":"   §6"},{"text":"    §e"}]}},{"text":"⑦异能面板\n"},{"text":"§a抬头确定✔ §c低头取消✘\n\n\n\n"}]}

B

雪球面板第一面的各种功能

1
execute as @a[scores={雪球菜单=1},rx=-88] run scoreboard players set @s 雪球菜单 10
1
execute as @a[scores={雪球菜单=2},rx=-88] run say @a[scores={雪球菜单=2}] 想不开,原地去世了
1
execute as @a[scores={雪球菜单=2},rx=-85] run kill @s
1
execute as @a[scores={雪球菜单=3},rx=-85] run gamemode 0 @s
1
execute as @a[scores={雪球菜单=4},rx=-85] run spawnpoint @s
1
execute as @a[scores={雪球菜单=4},rx=-85] run title @s title §l§d已设置重生点!
1
execute as @a[scores={雪球菜单=1..4},rx=-85] run scoreboard players set @s 雪球菜单 0
1
execute as @a[scores={雪球菜单=7},rx=-88,tag=!yn] run title @s title 你没有或无法使用异能
1
execute as @a[scores={雪球菜单=7},rx=-88,tag=yn] run scoreboard players set @s 雪球菜单 20
1
execute as @a[scores={雪球菜单=7},rx=-85] run scoreboard players set @s 雪球菜单 0

C

玩家互传功能

1
execute as @a[scores={雪球菜单=5},rx=-85] run say 发起了传送,打开§l§b雪球菜单§6接受传送§r即可将他传送过来。
1
execute as @a[scores={雪球菜单=5},rx=-85] run tag @s add 传送
1
execute as @a[scores={雪球菜单=5},rx=-85] run scoreboard players set 计时 雪球菜单 60
1
execute as @a[tag=传送] run titleraw @a[scores={雪球菜单=0}] actionbar {"rawtext":[{"text":"§l§b玩家§e"},{"selector":"@a[tag=传送]"},{"text":"§b的传送请求倒计时§f: "},{"score":{"name":"计时","objective":"雪球菜单"}}]}
1
tp @a[tag=传送] @a[scores={雪球菜单=6},rx=-85]
看图.这个命令方块得设置为有条件
1
say 已成功将§l§e @a[tag=传送] §r传送至§l§e @a[scores={雪球菜单=6},rx=-85]
看图.这个命令方块得设置为有条件
1
tag @a remove 传送
1
execute as @a[scores={雪球菜单=5..6},rx=-85] run scoreboard players set @s 雪球菜单 0

D

同为玩家互传功能

D1这个重复的命令方块需要设置20的延迟

20为1秒,在D2中运行一次即减一秒

这个重复的命令方块需要设置20的延迟
1
execute as @a[tag=传送] run scoreboard players remove 计时 雪球菜单 1
1
scoreboard players test 计时 雪球菜单 * -1
看图.这个命令方块得设置为有条件
1
tag @a remove 传送
1
say 超时无人同意,已自动取消传送请求。

E

增益效果

1
execute as @a[scores={雪球菜单=20..29}] run titleraw @s actionbar {"rawtext":[{"text":"§l§b   『异能』\n▶==================◀\n"},{"translate":"%%2","with":{"rawtext":[{"selector":"@s[scores={雪球菜单=21}]"},{"text":"   §6"},{"text":"   §e"}]}},{"text":"①.『生命』\n"},{"translate":"%%2","with":{"rawtext":[{"selector":"@s[scores={雪球菜单=22}]"},{"text":"   §6"},{"text":"   §e"}]}},{"text":"②.『夜视』\n"},{"translate":"%%2","with":{"rawtext":[{"selector":"@s[scores={雪球菜单=23}]"},{"text":"   §6"},{"text":"   §e"}]}},{"text":"③.『力量』\n"},{"translate":"%%2","with":{"rawtext":[{"selector":"@s[scores={雪球菜单=24}]"},{"text":"   §6"},{"text":"   §e"}]}},{"text":"④.『隐身』\n"},{"translate":"%%2","with":{"rawtext":[{"selector":"@s[scores={雪球菜单=25}]"},{"text":"   §6"},{"text":"   §e"}]}},{"text":"⑤.『速度』\n"},{"translate":"%%2","with":{"rawtext":[{"selector":"@s[scores={雪球菜单=26}]"},{"text":"   §6"},{"text":"   §e"}]}},{"text":"⑥.『待开发异能』\n"},{"translate":"%%2","with":{"rawtext":[{"selector":"@s[scores={雪球菜单=27}]"},{"text":"   §6"},{"text":"   §e"}]}},{"text":"⑦.『待开发异能』\n"},{"translate":"%%2","with":{"rawtext":[{"selector":"@s[scores={雪球菜单=28}]"},{"text":"   §6"},{"text":"   §e"}]}},{"text":"⑧.『待开发异能』\n"},{"translate":"%%2","with":{"rawtext":[{"selector":"@s[scores={雪球菜单=29}]"},{"text":"   §6"},{"text":"   §e"}]}},{"text":"⑨.『待开发』\n"},{"text":"§b▶==================◀\n§a抬头确定✔ §c低头关闭✘\n\n\n"}]}
1
execute as @a[scores={雪球菜单=21},rx=-85] run effect @s regeneration 30 1
1
execute as @a[scores={雪球菜单=22},rx=-85] run effect @s night_vision 600 1
1
execute as @a[scores={雪球菜单=23},rx=-85] run effect @s strength 60 3
1
execute as @a[scores={雪球菜单=24},rx=-85] run effect @s invisibility 600 1
1
execute as @a[scores={雪球菜单=25},rx=-85] run effect @s speed 120 1
1
自己加功能
1
execute as @a[scores={雪球菜单=29},rx=-85,tag=op] run gamemode 1 @s
1
execute as @a[scores={雪球菜单=20..29},rx=-85] run scoreboard players set @s 雪球菜单 20

F

定点传送的二级面板

1
execute as @a[scores={雪球菜单=10..19}] run titleraw @s actionbar {"rawtext":[{"text":"§l§b   『定点传送』\n▶==================◀\n"},{"translate":"%%2","with":{"rawtext":[{"selector":"@s[scores={雪球菜单=11}]"},{"text":"   §6"},{"text":"   §e"}]}},{"text":"①.『传送主城』\n"},{"translate":"%%2","with":{"rawtext":[{"selector":"@s[scores={雪球菜单=12}]"},{"text":"   §6"},{"text":"   §e"}]}},{"text":"②.『传送樱花林』\n"},{"translate":"%%2","with":{"rawtext":[{"selector":"@s[scores={雪球菜单=13}]"},{"text":"   §6"},{"text":"   §e"}]}},{"text":"③.『传送新手村』\n"},{"translate":"%%2","with":{"rawtext":[{"selector":"@s[scores={雪球菜单=14}]"},{"text":"   §6"},{"text":"   §e"}]}},{"text":"④.『传送控制台』\n"},{"translate":"%%2","with":{"rawtext":[{"selector":"@s[scores={雪球菜单=15}]"},{"text":"   §6"},{"text":"   §e"}]}},{"text":"⑤.『空的传送锚点』\n"},{"translate":"%%2","with":{"rawtext":[{"selector":"@s[scores={雪球菜单=16}]"},{"text":"   §6"},{"text":"   §e"}]}},{"text":"⑥.『空的传送锚点』\n"},{"translate":"%%2","with":{"rawtext":[{"selector":"@s[scores={雪球菜单=17}]"},{"text":"   §6"},{"text":"   §e"}]}},{"text":"⑦.『空的传送锚点』\n"},{"translate":"%%2","with":{"rawtext":[{"selector":"@s[scores={雪球菜单=18}]"},{"text":"   §6"},{"text":"   §e"}]}},{"text":"⑧.『空的传送锚点』\n"},{"translate":"%%2","with":{"rawtext":[{"selector":"@s[scores={雪球菜单=19}]"},{"text":"   §6"},{"text":"   §e"}]}},{"text":"⑨.『空的传送锚点』\n"},{"text":"§b▶==================◀\n§a抬头确定✔ §c低头关闭✘\n\n\n"}]}
1
execute as @a[scores={雪球菜单=11},rx=-85] run tp 670 91 549
1
execute as @a[scores={雪球菜单=11},rx=-85] run tp 670 91 549

1
execute as @a[scores={雪球菜单=10..19},rx=-85] run scoreboard players set @s 雪球菜单 10
1
execute as @a[scores={雪球菜单=19}] at @s run scoreboard players set @s 雪球菜单 10