求显示玩家累计在线时间的计分板指令,希望有哪位大佬解答。
做20个ticks加1的dummy计分板
本帖最后由 尸先peng 于 2021-11-28 11:52 编辑
scoreboard objectives add 1 dummy
scoreboard objectives add time dummy
scoreboard objectives setdisplay sidebar
scoreboard players add @a 1 1
execute as @a[scores={1=20..}] at @s run scoreboard players add @s time 1
execute as @a[scores={1=20..}] at @s run scoreboard players reset @s 1
这样就可以显示玩家在线时间了(单位:秒)
如果要以分钟为单位,可以把加粗数字改为120
以小时为单位同理,将加粗数字改为7200
感谢下方评分提醒↓↓↓






这样就可以显示玩家在线时间了(单位:秒)
如果要以分钟为单位,可以把加粗数字改为120
以小时为单位同理,将加粗数字改为7200
感谢下方评分提醒↓↓↓
希望这个能帮助到你
尸先peng 发表于 2021-11-27 17:40
scoreboard objectives add 1 dummy
scoreboard objectives add time dum ...
服务器里的话@a这种目标选择器没法用吧