Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion data/mce/functions/core/load.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,8 @@ execute unless data storage mce:config api.announce_default_preset run data modi
# v2.2.0 -> 2002000
scoreboard players set #mce load.status 2003000


data modify storage mce:config global.loaded set value 1b
scoreboard objectives remove loadMCE
tellraw @a ["",{"text":"[MCE] ","color":"aqua"},{"text":"Marker Command Engine v2.3.0 loaded!","color":"white"}]
tellraw @a ["",{"text":"[MCE] ","color":"aqua"},{"text":"Marker Command Engine v2.3.0 loaded!","color":"yellow"}]
tellraw @a ["",{"text":"[MCE] ","color":"aqua"},{"text":"Click here to reset.","color":"yellow","clickEvent":{"action":"run_command","value":"/function mce:load/reset_all"]}]
2 changes: 1 addition & 1 deletion data/mce/functions/load/main.mcfunction
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
scoreboard objectives add loadMCE trigger
scoreboard players enable @a loadMCE

tellraw @a ["",{"text":"[✔ INSTALL]","color":"green","bold":true,"clickEvent":{"action":"run_command","value":"/trigger loadMCE set 1"},"hoverEvent":{"action":"show_text","contents":"Install the datapack"}},{"text":" "},{"text":"[✖ CANCEL]","color":"red","bold":true,"clickEvent":{"action":"run_command","value":"/trigger loadMCE set 2"},"hoverEvent":{"action":"show_text","contents":"Cancel the installation"}}]
execute if data storage mce:config {global:{loaded:1b}} run tellraw @a ["",{"text":"[✔ INSTALL]","color":"green","bold":true,"clickEvent":{"action":"run_command","value":"/trigger loadMCE set 1"},"hoverEvent":{"action":"show_text","contents":"Install the datapack"}},{"text":" "},{"text":"[✖ CANCEL]","color":"red","bold":true,"clickEvent":{"action":"run_command","value":"/trigger loadMCE set 2"},"hoverEvent":{"action":"show_text","contents":"Cancel the installation"}}]
27 changes: 27 additions & 0 deletions data/mce/functions/load/reset_all.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Objectives
scoreboard objectives add mce.queue dummy
scoreboard objectives add mce.tick dummy
scoreboard objectives add mce.compat dummy
scoreboard objectives add mce.cd dummy
scoreboard objectives add mce.log dummy
scoreboard objectives add loadMCE
scoreboard players reset #tick mce.tick
scoreboard players reset #queue.active mce.compat
scoreboard players reset #sched.exists mce.compat
scoreboard players reset #error.count mce.queue

# Storages
data remove storage mce:error Last
data remove storage mce:error Code
data remove storage mce:queue commands
data remove storage mce:schedule jobs
data remove storage mce:log entries
data remove storage mce:text_batch entries
data remove storage mce:batch commands
data remove storage mce:config mce.debug
data remove storage mce:config mce.queue_interval
data remove storage mce:config mce.track_output
data remove storage mce:config api.announce_default_preset

# Debug / Tellraw
tellraw @a ["",{"text":"[MCE] ","color":"aqua"},{"text":"Marker Command Engine v2.3.0 reseted!","color":"yellow"}]