This commit is contained in:
Harveykang
2020-12-28 18:09:49 +08:00
parent cc392b1828
commit 3f66bb499f
4 changed files with 27 additions and 9 deletions
+2 -2
View File
@@ -16,9 +16,9 @@ function fz:login/logintips/install
function fz:carpet/carpet
#版本信息
data merge storage fz.installed {installed:1b}
data merge storage fz {version:Beta-2.0.0.10}
data merge storage fz {version:Beta-2.0.0.11}
data merge storage fz {date:2020-12.28}
data merge storage fz {time:"17:16"}
data merge storage fz {time:"1801"}
data merge storage fz {snapshot:-SNAPSHOT}
##data remove storage fz snapshot
tellraw @a {"text": "[信息]启动完毕","color": "#5fff00"}
+2 -2
View File
@@ -1,8 +1,8 @@
#如果未安装且未卸载则安装
execute unless data storage fz.installed {installed:1b} unless data storage fz.installed {installed:0b} run function fz:install
#如果版本正确且已安装则开始运行
execute if data storage fz {version:Beta-2.0.0.10} if data storage fz.installed {installed:1b} run function fz:start
execute if data storage fz {version:Beta-2.0.0.11} if data storage fz.installed {installed:1b} run function fz:start
#如果版本不符则更新
execute unless data storage fz {version:Beta-2.0.0.10} run function fz:update
execute unless data storage fz {version:Beta-2.0.0.11} run function fz:update
#输出版本信息
tellraw @a [{"text": "[版本信息]FZ's Datapack-","color": "#ffd900"},{"nbt":"version","storage":"fz","color": "#ffd900"},{"nbt": "snapshot", "storage": "fz","color": "red"}]