diff --git a/README.md b/README.md index d79ffaf..07fe88f 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ A Minecraft Datapack ### v2.0.0 - 支持Minecraft1.16.x - 抬头并按一下shift来打开设置界面 -- 提供一些地毯脚本: +- 提供一些地毯脚本:*请在升级数据包的同时替换这些工具!!* - 安装方法: - 需要carpet mod 1.4.21:https://github.com/gnembon/fabric-carpet/releases - 将其放入“world/scripts”中(在客户端位于“.minecraft/saves/存档名/scripts”或“.minecraft/config/carpet/scripts”) @@ -40,8 +40,10 @@ A Minecraft Datapack - 输入“/restore_scores by_whitelist”开始恢复 - 输入“/scripts unload restore_scores”卸载工具 - 记得用完就删掉它! -##### v2.0.0.10(计划) -- 添加单独的记分板升级工具 +- 计划 + - 添加单独的记分板升级工具 +##### v2.0.0.10 +- 扫地机添加了位于怪物血条栏的文字提示,同时添加了各种提示的开关功能 ##### v2.0.0.9 - 修复矿车白名单状态反了的bug ##### v2.0.0.8 @@ -62,4 +64,4 @@ A Minecraft Datapack - tagplayer需要地毯mod1.4.18或以上版本来运行 - 优化了tagplayer体验及修复若干bug ##### v2.0.0.2 -- 重写 \ No newline at end of file +- 重写 diff --git a/data/fz/functions/carpet/autosetup.mcfunction b/data/fz/functions/carpet/autosetup.mcfunction index b3f7a26..2f956a3 100644 --- a/data/fz/functions/carpet/autosetup.mcfunction +++ b/data/fz/functions/carpet/autosetup.mcfunction @@ -1,3 +1,18 @@ #给萌新辅助自动配置地毯优化和功能的函数 carpet setDefault language zh_cn -carpet setDefault antiCheatDisabled true \ No newline at end of file +carpet setDefault antiCheatDisabled true +carpet setDefault combineXPOrbs true +carpet setDefault persistentParrots true +carpet setDefault stackableShulkerBoxes true +carpet setDefault lagFreeSpawning true +carpet setDefault ctrlQCraftingFix true +carpet setDefault flippinCactus true +carpet setDefault missingTools true +carpet setDefault smoothClientAnimations true +carpet setDefault optimizedTNT true +carpet setDefault leadFix true +carpet setDefault placementRotationFix true +carpet setDefault xpNoCooldown true +carpet setDefault defaultLoggers mobcaps,tps +carpet setDefault commandTick true +carpet setDefault commandTrackAI true \ No newline at end of file diff --git a/data/fz/functions/config/display.mcfunction b/data/fz/functions/config/display.mcfunction index 68532e7..62d869b 100644 --- a/data/fz/functions/config/display.mcfunction +++ b/data/fz/functions/config/display.mcfunction @@ -1,6 +1,7 @@ #设置或重设超时时间为300s,超时后运行timeout函数 schedule function fz:config/timeout 300s #输出玩家可见的设置页面 +##扫地机 execute if data storage fz.installed {sweeper:1b} run tellraw @s {"text": "扫地机:","color": "#ccff00"} ##扫地机时间,对应分数1478966210-1478966215 execute if data storage fz.installed {sweeper:1b} run tellraw @s [{"text": "- "},{"text": "[关]","color": "#00ff00","clickEvent": {"action": "run_command","value": "/trigger config set 1478966210"}},{"text": "[30秒]","color": "#5fff00","clickEvent": {"action": "run_command","value": "/trigger config set 1478966211"}},{"text": "[1分钟]","color": "#d7ff00","clickEvent": {"action": "run_command","value": "/trigger config set 1478966212"}},{"text": "[2分钟]","color": "#ffd900","clickEvent": {"action": "run_command","value": "/trigger config set 1478966213"}},{"text": "[3分钟]","color": "#ff6100","clickEvent": {"action": "run_command","value": "/trigger config set 1478966214"}},{"text": "[4分钟]","color": "#ff0000","clickEvent": {"action": "run_command","value": "/trigger config set 1478966215"}}] @@ -8,6 +9,16 @@ execute if data storage fz.installed {sweeper:1b} run tellraw @s {"text": "扫 execute if data storage fz.installed {sweeper:1b} unless score keepMinecart parameter matches 1 run tellraw @s [{"text": "- "},{"text": "矿车白名单:","color": "#8c8f91"},{"text": "[已关闭]","color": "#ff0000","clickEvent": {"action": "run_command","value": "/trigger config set 1478966216"}}] ##关闭矿车白名单1478966217 execute if data storage fz.installed {sweeper:1b} if score keepMinecart parameter matches 1 run tellraw @s [{"text": "- "},{"text": "矿车白名单:","color": "#8c8f91"},{"text": "[已开启]","color": "#00ff00","clickEvent": {"action": "run_command","value": "/trigger config set 1478966217"}}] + ##声音提示 + execute if data storage fz.installed {sweeper:1b} run tellraw @s[tag=!fz.sweeperSoundOff] [{"text": "- "},{"text": "声音:","color": "#8c8f91"},{"text": "[已开启]","color": "#00ff00","clickEvent": {"action": "run_command","value": "/trigger config set 1478966209"}}] + execute if data storage fz.installed {sweeper:1b} run tellraw @s[tag=fz.sweeperSoundOff] [{"text": "- "},{"text": "声音:","color": "#8c8f91"},{"text": "[已关闭]","color": "#ff0000","clickEvent": {"action": "run_command","value": "/trigger config set 1478966208"}}] + ##消息提示 + execute if data storage fz.installed {sweeper:1b} run tellraw @s[tag=!fz.sweeperMessageOff] [{"text": "- "},{"text": "消息:","color": "#8c8f91"},{"text": "[已开启]","color": "#00ff00","clickEvent": {"action": "run_command","value": "/trigger config set 1478966205"}}] + execute if data storage fz.installed {sweeper:1b} run tellraw @s[tag=fz.sweeperMessageOff] [{"text": "- "},{"text": "消息:","color": "#8c8f91"},{"text": "[已关闭]","color": "#ff0000","clickEvent": {"action": "run_command","value": "/trigger config set 1478966204"}}] + ##血条栏提示 + execute if data storage fz.installed {sweeper:1b} run tellraw @s[tag=!fz.sweeperBossbarOff] [{"text": "- "},{"text": "血条栏:","color": "#8c8f91"},{"text": "[已开启]","color": "#00ff00","clickEvent": {"action": "run_command","value": "/trigger config set 1478966207"}}] + execute if data storage fz.installed {sweeper:1b} run tellraw @s[tag=fz.sweeperBossbarOff] [{"text": "- "},{"text": "血条栏:","color": "#8c8f91"},{"text": "[已关闭]","color": "#ff0000","clickEvent": {"action": "run_command","value": "/trigger config set 1478966206"}}] +##记分板 execute if data storage fz.installed {scoreboards:1b} run tellraw @s {"text": "记分板:","color": "#ccff00"} ##计分板显示,对应分数1838019370-1838019379 execute if data storage fz.installed {scoreboards:1b} run tellraw @s [{"text": "- "},{"text": "[关]","color": "#ff0000","clickEvent": {"action": "run_command","value": "/trigger config set 1838019370"}},{"text": "[轮播]","color": "gold","clickEvent": {"action": "run_command","value": "/trigger config set 1838019371"}},{"text": "[总量]","color": "dark_aqua","clickEvent": {"action": "run_command","value": "/trigger config set 1838019379"}},{"text": "[在线时间(h)]","color": "aqua","clickEvent": {"action": "run_command","value": "/trigger config set 1838019372"}},{"text": "[抖M名单]","color": "yellow","clickEvent": {"action": "run_command","value": "/trigger config set 1838019373"}},{"text": "[死亡榜]","color": "dark_red","clickEvent": {"action": "run_command","value": "/trigger config set 1838019374"}},{"text": "[挖掘榜]","color": "gray","clickEvent": {"action": "run_command","value": "/trigger config set 1838019375"}},{"text": "[钩直饵咸]","color": "blue","clickEvent": {"action": "run_command","value": "/trigger config set 1838019376"}},{"text": "[击杀榜]","color": "red","clickEvent": {"action": "run_command","value": "/trigger config set 1838019377"}},{"text": "[交♂易榜]","color": "green","clickEvent": {"action": "run_command","value": "/trigger config set 1838019378"}}] \ No newline at end of file diff --git a/data/fz/functions/config/main.mcfunction b/data/fz/functions/config/main.mcfunction index 4086884..40acbe9 100644 --- a/data/fz/functions/config/main.mcfunction +++ b/data/fz/functions/config/main.mcfunction @@ -2,8 +2,7 @@ #允许玩家操作config记分板 scoreboard players enable @a config #每条子函数都要reset config分数和function fz:config/display -execute if data storage fz.installed {sweeper:1b} as @a if score @s config matches 1478966210..1478966215 run function fz:sweeper/config/trigger -execute if data storage fz.installed {sweeper:1b} as @a if score @s config matches 1478966216..1478966217 run function fz:sweeper/config/whitelist +execute if data storage fz.installed {sweeper:1b} as @a if score @s config matches 1478966200..1478966217 run function fz:sweeper/config/trigger execute if data storage fz.installed {scoreboards:1b} as @a if score @s config matches 1838019370..1838019379 run function fz:scoreboards/config #循环执行本函数 schedule function fz:config/main 1 \ No newline at end of file diff --git a/data/fz/functions/install.mcfunction b/data/fz/functions/install.mcfunction index 08585af..f4665e1 100644 --- a/data/fz/functions/install.mcfunction +++ b/data/fz/functions/install.mcfunction @@ -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.9} -data merge storage fz {date:2020-12.27} -data merge storage fz {time:"23:32"} +data merge storage fz {version:Beta-2.0.0.10} +data merge storage fz {date:2020-12.28} +data merge storage fz {time:"17:16"} data merge storage fz {snapshot:-SNAPSHOT} ##data remove storage fz snapshot tellraw @a {"text": "[信息]启动完毕","color": "#5fff00"} diff --git a/data/fz/functions/load.mcfunction b/data/fz/functions/load.mcfunction index 7aeb4b0..eb3c7f7 100644 --- a/data/fz/functions/load.mcfunction +++ b/data/fz/functions/load.mcfunction @@ -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.9} if data storage fz.installed {installed:1b} run function fz:start +execute if data storage fz {version:Beta-2.0.0.10} if data storage fz.installed {installed:1b} run function fz:start #如果版本不符则更新 -execute unless data storage fz {version:Beta-2.0.0.9} run function fz:update +execute unless data storage fz {version:Beta-2.0.0.10} run function fz:update #输出版本信息 tellraw @a [{"text": "[版本信息]FZ's Datapack-","color": "#ffd900"},{"nbt":"version","storage":"fz","color": "#ffd900"},{"nbt": "snapshot", "storage": "fz","color": "red"}] \ No newline at end of file diff --git a/data/fz/functions/sweeper/bossbar.mcfunction b/data/fz/functions/sweeper/bossbar.mcfunction new file mode 100644 index 0000000..901f8d2 --- /dev/null +++ b/data/fz/functions/sweeper/bossbar.mcfunction @@ -0,0 +1,4 @@ +bossbar set fz.sweeper name [{"score": {"name": "sweeperBossbar","objective": "parameter"},"color": "#ff6100","underlined": true,"bold": true},{"text": "秒后清理垃圾","color": "#ffd900","bold": false}] +bossbar set fz.sweeper players @a[tag=!fz.sweeperBossbarOff] +scoreboard players remove sweeperBossbar parameter 1 +schedule function fz:sweeper/bossbar 1s \ No newline at end of file diff --git a/data/fz/functions/sweeper/config/off.mcfunction b/data/fz/functions/sweeper/config/off.mcfunction index 1cb3380..93f4d1f 100644 --- a/data/fz/functions/sweeper/config/off.mcfunction +++ b/data/fz/functions/sweeper/config/off.mcfunction @@ -1,4 +1,5 @@ execute unless score sweeperTime parameter matches 0 run scoreboard players set sweeperTime parameter 0 +schedule clear fz:sweeper/bossbar schedule clear fz:sweeper/main schedule clear fz:sweeper/timer/1s schedule clear fz:sweeper/timer/2s @@ -11,5 +12,8 @@ schedule clear fz:sweeper/timer/1min schedule clear fz:sweeper/timer/2min schedule clear fz:sweeper/timer/3min schedule clear fz:sweeper/timer/4min -tellraw @a {"text": "[信息]扫地机已关闭","color": "#5fff00"} -execute as @a at @a run playsound minecraft:block.note_block.pling voice @s ~ ~ ~ 1 2 \ No newline at end of file +#设置怪物血条 +bossbar set minecraft:fz.sweeper visible false + +tellraw @a[tag=!fz.sweeperMessageOff] {"text": "[信息]扫地机已关闭","color": "#5fff00"} +execute as @a[tag=!fz.sweeperSoundOff] at @s run playsound minecraft:block.note_block.pling voice @s ~ ~ ~ 1 2 \ No newline at end of file diff --git a/data/fz/functions/sweeper/config/on.mcfunction b/data/fz/functions/sweeper/config/on.mcfunction index bc7c1f6..302b44a 100644 --- a/data/fz/functions/sweeper/config/on.mcfunction +++ b/data/fz/functions/sweeper/config/on.mcfunction @@ -3,6 +3,8 @@ execute if score @s config matches 1478966212 run scoreboard players set sweeper execute if score @s config matches 1478966213 run scoreboard players set sweeperTime parameter 120 execute if score @s config matches 1478966214 run scoreboard players set sweeperTime parameter 180 execute if score @s config matches 1478966215 run scoreboard players set sweeperTime parameter 240 +schedule clear fz:sweeper/bossbar +schedule clear fz:sweeper/main schedule clear fz:sweeper/timer/1s schedule clear fz:sweeper/timer/2s schedule clear fz:sweeper/timer/3s @@ -14,4 +16,8 @@ schedule clear fz:sweeper/timer/1min schedule clear fz:sweeper/timer/2min schedule clear fz:sweeper/timer/3min schedule clear fz:sweeper/timer/4min -function fz:sweeper/main \ No newline at end of file +#设置怪物血条 +bossbar set minecraft:fz.sweeper visible true + +function fz:sweeper/main +function fz:sweeper/bossbar \ No newline at end of file diff --git a/data/fz/functions/sweeper/config/trigger.mcfunction b/data/fz/functions/sweeper/config/trigger.mcfunction index 3a23f79..d3c7de1 100644 --- a/data/fz/functions/sweeper/config/trigger.mcfunction +++ b/data/fz/functions/sweeper/config/trigger.mcfunction @@ -1,5 +1,19 @@ execute if score @s config matches 1478966211..1478966215 run function fz:sweeper/config/on execute if score @s config matches 1478966210 run function fz:sweeper/config/off -execute if score @s config matches 1478966216 run function fz:sweeper/config/minecart +#提示音开关 +execute if score @s config matches 1478966208 run tag @s remove fz.sweeperSoundOff +execute if score @s config matches 1478966209 run tag @s add fz.sweeperSoundOff +#boss血条时间提示开关 +execute if score @s config matches 1478966206 run tag @s remove fz.sweeperBossbarOff +execute if score @s config matches 1478966207 run tag @s add fz.sweeperBossbarOff +#文字时间提示开关 +execute if score @s config matches 1478966204 run tag @s remove fz.sweeperMessageOff +execute if score @s config matches 1478966205 run tag @s add fz.sweeperMessageOff +#矿车白名单 +execute if score @s config matches 1478966216 run scoreboard players set keepMinecart parameter 1 +execute if score @s config matches 1478966217 run scoreboard players reset keepMinecart parameter + +bossbar set minecraft:fz.sweeper players @a[tag=!fz.sweeperBossbarOff] + scoreboard players reset @s config function fz:config/display \ No newline at end of file diff --git a/data/fz/functions/sweeper/config/whitelist.mcfunction b/data/fz/functions/sweeper/config/whitelist.mcfunction deleted file mode 100644 index 34e7fbc..0000000 --- a/data/fz/functions/sweeper/config/whitelist.mcfunction +++ /dev/null @@ -1,4 +0,0 @@ -execute if score @s config matches 1478966216 run scoreboard players set keepMinecart parameter 1 -execute if score @s config matches 1478966217 run scoreboard players reset keepMinecart parameter -scoreboard players reset @s config -function fz:config/display \ No newline at end of file diff --git a/data/fz/functions/sweeper/install.mcfunction b/data/fz/functions/sweeper/install.mcfunction index 56653c4..1f6ad3a 100644 --- a/data/fz/functions/sweeper/install.mcfunction +++ b/data/fz/functions/sweeper/install.mcfunction @@ -1,5 +1,6 @@ data merge storage fz.installed {sweeper:1b} - +bossbar add fz.sweeper {"text":"null"} +bossbar set fz.sweeper value 0 #提示已安装 tellraw @a {"text": "[信息]扫地机已安装","color": "#5fff00"} function fz:sweeper/start \ No newline at end of file diff --git a/data/fz/functions/sweeper/main.mcfunction b/data/fz/functions/sweeper/main.mcfunction index 8fa3142..5bce38c 100644 --- a/data/fz/functions/sweeper/main.mcfunction +++ b/data/fz/functions/sweeper/main.mcfunction @@ -1,9 +1,10 @@ execute if score keepMinecart parameter matches 1 run execute store result score sweeperItem parameter run kill @e[type=item,predicate=!fz:sweeper/minecart] execute unless score keepMinecart parameter matches 1 run execute store result score sweeperItem parameter run kill @e[type=item] tellraw @a [{"text": "[信息]本次清理了","color": "#5fff00"},{"score": {"objective": "parameter", "name": "sweeperItem"},"color": "#5fff00"},{"text": "堆物品","color": "#5fff00"}] -execute as @a at @a run playsound minecraft:block.note_block.pling voice @s ~ ~ ~ 1 2 +execute as @a[tag=!fz.sweeperSoundOff] at @s run playsound minecraft:block.note_block.pling voice @s ~ ~ ~ 1 2 execute if score sweeperTime parameter matches 30 run function fz:sweeper/timer/30s execute if score sweeperTime parameter matches 60 run function fz:sweeper/timer/1min execute if score sweeperTime parameter matches 120 run function fz:sweeper/timer/2min execute if score sweeperTime parameter matches 180 run function fz:sweeper/timer/3min -execute if score sweeperTime parameter matches 240 run function fz:sweeper/timer/4min \ No newline at end of file +execute if score sweeperTime parameter matches 240 run function fz:sweeper/timer/4min +scoreboard players operation sweeperBossbar parameter = sweeperTime parameter \ No newline at end of file diff --git a/data/fz/functions/sweeper/start.mcfunction b/data/fz/functions/sweeper/start.mcfunction index 0226285..9e39f82 100644 --- a/data/fz/functions/sweeper/start.mcfunction +++ b/data/fz/functions/sweeper/start.mcfunction @@ -1,3 +1,5 @@ +schedule clear fz:sweeper/bossbar +schedule clear fz:sweeper/main schedule clear fz:sweeper/timer/1s schedule clear fz:sweeper/timer/2s schedule clear fz:sweeper/timer/3s @@ -9,5 +11,6 @@ schedule clear fz:sweeper/timer/1min schedule clear fz:sweeper/timer/2min schedule clear fz:sweeper/timer/3min schedule clear fz:sweeper/timer/4min +bossbar set fz.sweeper visible false tellraw @a {"text": "[信息]扫地机已启用","color": "#5fff00"} \ No newline at end of file diff --git a/data/fz/functions/sweeper/timer/10s.mcfunction b/data/fz/functions/sweeper/timer/10s.mcfunction index 76b7a66..a7c3940 100644 --- a/data/fz/functions/sweeper/timer/10s.mcfunction +++ b/data/fz/functions/sweeper/timer/10s.mcfunction @@ -1,3 +1,3 @@ -tellraw @a {"text": "[提醒]10s后清理掉落物","color": "#66ffff"} -execute as @a at @a run playsound minecraft:block.note_block.pling voice @s ~ ~ ~ 1 1 +tellraw @a[tag=!fz.sweeperMessageOff] {"text": "[提醒]10s后清理掉落物","color": "#66ffff"} +execute as @a[tag=!fz.sweeperSoundOff] at @s run playsound minecraft:block.note_block.pling voice @s ~ ~ ~ 1 1 schedule function fz:sweeper/timer/5s 5s \ No newline at end of file diff --git a/data/fz/functions/sweeper/timer/1min.mcfunction b/data/fz/functions/sweeper/timer/1min.mcfunction index acedf5d..16e8a70 100644 --- a/data/fz/functions/sweeper/timer/1min.mcfunction +++ b/data/fz/functions/sweeper/timer/1min.mcfunction @@ -1,3 +1,3 @@ -tellraw @a {"text": "[提醒]1min后清理掉落物","color": "#66ffff"} -execute as @a at @a run playsound minecraft:block.note_block.pling voice @s ~ ~ ~ 1 1 +tellraw @a[tag=!fz.sweeperMessageOff] {"text": "[提醒]1min后清理掉落物","color": "#66ffff"} +execute as @a[tag=!fz.sweeperSoundOff] at @s run playsound minecraft:block.note_block.pling voice @s ~ ~ ~ 1 1 schedule function fz:sweeper/timer/30s 30s \ No newline at end of file diff --git a/data/fz/functions/sweeper/timer/1s.mcfunction b/data/fz/functions/sweeper/timer/1s.mcfunction index 25b0bb8..d64f111 100644 --- a/data/fz/functions/sweeper/timer/1s.mcfunction +++ b/data/fz/functions/sweeper/timer/1s.mcfunction @@ -1,3 +1,3 @@ -tellraw @a {"text": "[提醒]1s后清理掉落物","color": "#66ffff"} -execute as @a at @a run playsound minecraft:block.note_block.pling voice @s ~ ~ ~ 1 1 +tellraw @a[tag=!fz.sweeperMessageOff] {"text": "[提醒]1s后清理掉落物","color": "#66ffff"} +execute as @a[tag=!fz.sweeperSoundOff] at @s run playsound minecraft:block.note_block.pling voice @s ~ ~ ~ 1 1 schedule function fz:sweeper/main 1s \ No newline at end of file diff --git a/data/fz/functions/sweeper/timer/2min.mcfunction b/data/fz/functions/sweeper/timer/2min.mcfunction index 59af305..e2599a5 100644 --- a/data/fz/functions/sweeper/timer/2min.mcfunction +++ b/data/fz/functions/sweeper/timer/2min.mcfunction @@ -1,3 +1,3 @@ -tellraw @a {"text": "[提醒]2min后清理掉落物","color": "#66ffff"} -execute as @a at @a run playsound minecraft:block.note_block.pling voice @s ~ ~ ~ 1 1 +tellraw @a[tag=!fz.sweeperMessageOff] {"text": "[提醒]2min后清理掉落物","color": "#66ffff"} +execute as @a[tag=!fz.sweeperSoundOff] at @s run playsound minecraft:block.note_block.pling voice @s ~ ~ ~ 1 1 schedule function fz:sweeper/timer/1min 60s \ No newline at end of file diff --git a/data/fz/functions/sweeper/timer/2s.mcfunction b/data/fz/functions/sweeper/timer/2s.mcfunction index b7373a5..e277735 100644 --- a/data/fz/functions/sweeper/timer/2s.mcfunction +++ b/data/fz/functions/sweeper/timer/2s.mcfunction @@ -1,3 +1,3 @@ -tellraw @a {"text": "[提醒]2s后清理掉落物","color": "#66ffff"} -execute as @a at @a run playsound minecraft:block.note_block.pling voice @s ~ ~ ~ 1 1 +tellraw @a[tag=!fz.sweeperMessageOff] {"text": "[提醒]2s后清理掉落物","color": "#66ffff"} +execute as @a[tag=!fz.sweeperSoundOff] at @s run playsound minecraft:block.note_block.pling voice @s ~ ~ ~ 1 1 schedule function fz:sweeper/timer/1s 1s \ No newline at end of file diff --git a/data/fz/functions/sweeper/timer/30s.mcfunction b/data/fz/functions/sweeper/timer/30s.mcfunction index 49b9833..8bda140 100644 --- a/data/fz/functions/sweeper/timer/30s.mcfunction +++ b/data/fz/functions/sweeper/timer/30s.mcfunction @@ -1,3 +1,3 @@ -tellraw @a {"text": "[提醒]30s后清理掉落物","color": "#66ffff"} -execute as @a at @a run playsound minecraft:block.note_block.pling voice @s ~ ~ ~ 1 1 +tellraw @a[tag=!fz.sweeperMessageOff] {"text": "[提醒]30s后清理掉落物","color": "#66ffff"} +execute as @a[tag=!fz.sweeperSoundOff] at @s run playsound minecraft:block.note_block.pling voice @s ~ ~ ~ 1 1 schedule function fz:sweeper/timer/10s 20s \ No newline at end of file diff --git a/data/fz/functions/sweeper/timer/3min.mcfunction b/data/fz/functions/sweeper/timer/3min.mcfunction index 479ebef..f1414ca 100644 --- a/data/fz/functions/sweeper/timer/3min.mcfunction +++ b/data/fz/functions/sweeper/timer/3min.mcfunction @@ -1,3 +1,3 @@ -tellraw @a {"text": "[提醒]3min后清理掉落物","color": "#66ffff"} -execute as @a at @a run playsound minecraft:block.note_block.pling voice @s ~ ~ ~ 1 1 +tellraw @a[tag=!fz.sweeperMessageOff] {"text": "[提醒]3min后清理掉落物","color": "#66ffff"} +execute as @a[tag=!fz.sweeperSoundOff] at @s run playsound minecraft:block.note_block.pling voice @s ~ ~ ~ 1 1 schedule function fz:sweeper/timer/2min 60s \ No newline at end of file diff --git a/data/fz/functions/sweeper/timer/3s.mcfunction b/data/fz/functions/sweeper/timer/3s.mcfunction index c3ae203..94390ab 100644 --- a/data/fz/functions/sweeper/timer/3s.mcfunction +++ b/data/fz/functions/sweeper/timer/3s.mcfunction @@ -1,3 +1,3 @@ -tellraw @a {"text": "[提醒]3s后清理掉落物","color": "#66ffff"} -execute as @a at @a run playsound minecraft:block.note_block.pling voice @s ~ ~ ~ 1 1 +tellraw @a[tag=!fz.sweeperMessageOff] {"text": "[提醒]3s后清理掉落物","color": "#66ffff"} +execute as @a[tag=!fz.sweeperSoundOff] at @s run playsound minecraft:block.note_block.pling voice @s ~ ~ ~ 1 1 schedule function fz:sweeper/timer/2s 1s \ No newline at end of file diff --git a/data/fz/functions/sweeper/timer/4min.mcfunction b/data/fz/functions/sweeper/timer/4min.mcfunction index 9afc72a..1dc97a9 100644 --- a/data/fz/functions/sweeper/timer/4min.mcfunction +++ b/data/fz/functions/sweeper/timer/4min.mcfunction @@ -1,3 +1,3 @@ -tellraw @a {"text": "[提醒]4min后清理掉落物","color": "#66ffff"} -execute as @a at @a run playsound minecraft:block.note_block.pling voice @s ~ ~ ~ 1 1 +tellraw @a[tag=!fz.sweeperMessageOff] {"text": "[提醒]4min后清理掉落物","color": "#66ffff"} +execute as @a[tag=!fz.sweeperSoundOff] at @s run playsound minecraft:block.note_block.pling voice @s ~ ~ ~ 1 1 schedule function fz:sweeper/timer/3min 60s \ No newline at end of file diff --git a/data/fz/functions/sweeper/timer/4s.mcfunction b/data/fz/functions/sweeper/timer/4s.mcfunction index 1358c98..5a91789 100644 --- a/data/fz/functions/sweeper/timer/4s.mcfunction +++ b/data/fz/functions/sweeper/timer/4s.mcfunction @@ -1,3 +1,3 @@ -tellraw @a {"text": "[提醒]4s后清理掉落物","color": "#66ffff"} -execute as @a at @a run playsound minecraft:block.note_block.pling voice @s ~ ~ ~ 1 1 +tellraw @a[tag=!fz.sweeperMessageOff] {"text": "[提醒]4s后清理掉落物","color": "#66ffff"} +execute as @a[tag=!fz.sweeperSoundOff] at @s run playsound minecraft:block.note_block.pling voice @s ~ ~ ~ 1 1 schedule function fz:sweeper/timer/3s 1s \ No newline at end of file diff --git a/data/fz/functions/sweeper/timer/5s.mcfunction b/data/fz/functions/sweeper/timer/5s.mcfunction index bbc5e1b..dbbbc2a 100644 --- a/data/fz/functions/sweeper/timer/5s.mcfunction +++ b/data/fz/functions/sweeper/timer/5s.mcfunction @@ -1,3 +1,3 @@ -tellraw @a {"text": "[提醒]5s后清理掉落物","color": "#66ffff"} -execute as @a at @a run playsound minecraft:block.note_block.pling voice @s ~ ~ ~ 1 1 +tellraw @a[tag=!fz.sweeperMessageOff] {"text": "[提醒]5s后清理掉落物","color": "#66ffff"} +execute as @a[tag=!fz.sweeperSoundOff] at @s run playsound minecraft:block.note_block.pling voice @s ~ ~ ~ 1 1 schedule function fz:sweeper/timer/4s 1s \ No newline at end of file diff --git a/data/fz/functions/sweeper/uninstall.mcfunction b/data/fz/functions/sweeper/uninstall.mcfunction index 4df27ae..24aff0e 100644 --- a/data/fz/functions/sweeper/uninstall.mcfunction +++ b/data/fz/functions/sweeper/uninstall.mcfunction @@ -1,3 +1,4 @@ +schedule clear fz:sweeper/bossbar schedule clear fz:sweeper/main schedule clear fz:sweeper/timer/1s schedule clear fz:sweeper/timer/2s