creative_zone_builder 1.1.2

A small to to generate a datapack, which creates a creative zone in minecraft.
1
2
3
4
5
6
7
8
9
10
11
execute if entity @s[tag=cz] run clear @s
execute if entity @s[tag=cz,nbt={Inventory:[]}] run title @s title "Survival"
execute if entity @s[tag=cz,nbt={Inventory:[]}] run execute as @s run function cz:tp
execute if entity @s[tag=cz,nbt={Inventory:[]}] run scoreboard players reset @s[tag=cz,nbt={Inventory:[]}] cz_leave
execute if entity @s[tag=cz,nbt={Inventory:[]}] run scoreboard players enable @s[tag=cz,nbt={Inventory:[]}] cz_enter
gamemode survival @s[tag=cz,nbt={Inventory:[]}]
execute if entity @s[tag=cz,nbt={Inventory:[]}] run tag @s remove cz
execute if entity @s[tag=!cz,nbt={Inventory:[]}] run scoreboard players reset @s[tag=cz,nbt={Inventory:[]}] cz_leave
execute if entity @s[tag=!cz,nbt={Inventory:[]}] run scoreboard players reset @s[tag=cz,nbt={Inventory:[]}] cz_enter
execute if entity @s[tag=!cz,nbt={Inventory:[]}] run scoreboard players enable @s[tag=cz,nbt={Inventory:[]}] cz_enter
# execute if entity @s[tag=!cz,nbt={Inventory:[]}] run function cz:give_book