first commit
This commit is contained in:
10
data/noemie_mc_gm/function/switch_gm.mcfunction
Normal file
10
data/noemie_mc_gm/function/switch_gm.mcfunction
Normal file
@@ -0,0 +1,10 @@
|
||||
execute unless entity @s[type=minecraft:player] run return 0
|
||||
|
||||
scoreboard players set #gm noemie_mc_gm 0
|
||||
execute if entity @s[gamemode=survival] run scoreboard players set #gm noemie_mc_gm 1
|
||||
execute if entity @s[gamemode=creative] run scoreboard players set #gm noemie_mc_gm 2
|
||||
|
||||
execute if score #gm noemie_mc_gm matches 1 run function noemie_mc_gm:switch_gm/creative
|
||||
execute if score #gm noemie_mc_gm matches 2 run function noemie_mc_gm:switch_gm/survival
|
||||
|
||||
scoreboard players reset #gm noemie_mc_gm
|
||||
Reference in New Issue
Block a user