1- tellraw @a [ " " , {" text " : " Sleep " , " color " : " blue " , " clickEvent " : {" action " : " open_url " , " value " : " https://modrinth.com/datapack/sleep/ " }, " hoverEvent " : {" action " : " show_text " , " contents " : " modrinth.com/datapack/sleep/ " }}, {" text " : " loaded - " , " clickEvent " : {" action " : " open_url " , " value " : " https://modrinth.com/datapack/sleep/ " }, " hoverEvent " : {" action " : " show_text " , " contents " : " modrinth.com/datapack/sleep/ " }}, {" text " : " [1.20.4] " , " color " : " green " , " clickEvent " : {" action " : " open_url " , " value " : " https://modrinth.com/datapack/sleep/ " }, " hoverEvent " : {" action " : " show_text " , " contents " : " modrinth.com/datapack/sleep/ " }}, {" text " : " " , " clickEvent " : {" action " : " open_url " , " value " : " https://modrinth.com/datapack/sleep/ " }, " hoverEvent " : {" action " : " show_text " , " contents " : " modrinth.com/datapack/sleep/ " }}, {" text " : " v.0.2.0 " , " color " : " dark_green " , " clickEvent " : {" action " : " open_url " , " value " : " https://modrinth.com/datapack/sleep/ " }, " hoverEvent " : {" action " : " show_text " , " contents " : " modrinth.com/datapack/sleep/ " }}]
1+ tellraw @a [ " " , {" text " : " Sleep " , " color " : " blue " , " clickEvent " : {" action " : " open_url " , " value " : " https://modrinth.com/datapack/sleep/ " }, " hoverEvent " : {" action " : " show_text " , " contents " : " modrinth.com/datapack/sleep/ " }}, {" text " : " loaded - " , " clickEvent " : {" action " : " open_url " , " value " : " https://modrinth.com/datapack/sleep/ " }, " hoverEvent " : {" action " : " show_text " , " contents " : " modrinth.com/datapack/sleep/ " }}, {" text " : " [1.20.1] " , " color " : " green " , " clickEvent " : {" action " : " open_url " , " value " : " https://modrinth.com/datapack/sleep/ " }, " hoverEvent " : {" action " : " show_text " , " contents " : " modrinth.com/datapack/sleep/ " }}, {" text " : " " , " clickEvent " : {" action " : " open_url " , " value " : " https://modrinth.com/datapack/sleep/ " }, " hoverEvent " : {" action " : " show_text " , " contents " : " modrinth.com/datapack/sleep/ " }}, {" text " : " v.2.0.0 " , " color " : " dark_green " , " clickEvent " : {" action " : " open_url " , " value " : " https://modrinth.com/datapack/sleep/ " }, " hoverEvent " : {" action " : " show_text " , " contents " : " modrinth.com/datapack/sleep/ " }}]
2+
23scoreboard objectives add sleep . time_since_rest custom:time_since_rest
34
45scoreboard objectives add sleep . time_in_bed dummy
56
67scoreboard objectives add sleep . total_speeping dummy
78
8-
99scoreboard objectives add sleep . clock dummy
1010
1111
12- scoreboard objectives add sleep_notification trigger
12+ # disable gamerule
13+ gamerule playersSleepingPercentage 101
14+
15+
16+ # track how many players sleep
17+ scoreboard objectives add sleep . sleeping_players dummy
18+
19+ # track how many players are online
20+ scoreboard objectives add sleep . players_online dummy
21+
22+
23+
24+ # config
25+ # open config
26+ scoreboard objectives add sleep . config dummy
27+
28+
29+
30+ # set default values for sleep.config
31+
32+
33+ # time until skip
34+ execute as @a unless score & time_until_skip sleep . config = & time_until_skip sleep . config run scoreboard players set & time_until_skip sleep . config 2
35+
36+ # amount of players need to sleep
37+ execute as @a unless score & amount_to_sleep sleep . config = & amount_to_sleep sleep . config run scoreboard players set & amount_to_sleep sleep . config 1
38+
39+ # time skip or accelerated
40+ execute as @a unless score & time_control sleep . config = & time_control sleep . config run scoreboard players set & time_control sleep . config 0
41+
42+ # setting to disable phantoms
43+ # execute as @a unless score &phantoms_spawning sleep.config = &phantoms_spawning sleep.config run scoreboard players set &phantoms_spawning sleep.config 0
44+ # This is WIP
45+
46+
47+ # maybe setting if time to skip night should reset or not when one players gets out of bed
48+
49+ # setting to get command feedback
50+
51+ # skip night???
52+
53+ # notification settings
54+ scoreboard objectives add sleep_notification trigger
55+
56+ scoreboard objectives add help . sleep trigger
57+
0 commit comments