2.1.0
This commit is contained in:
@@ -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
|
||||
@@ -0,0 +1,19 @@
|
||||
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
|
||||
schedule clear fz:sweeper/timer/3s
|
||||
schedule clear fz:sweeper/timer/4s
|
||||
schedule clear fz:sweeper/timer/5s
|
||||
schedule clear fz:sweeper/timer/10s
|
||||
schedule clear fz:sweeper/timer/30s
|
||||
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 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
|
||||
@@ -0,0 +1,23 @@
|
||||
execute if score @s config matches 1478966211 run scoreboard players set sweeperTime parameter 30
|
||||
execute if score @s config matches 1478966212 run scoreboard players set sweeperTime parameter 60
|
||||
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
|
||||
schedule clear fz:sweeper/timer/4s
|
||||
schedule clear fz:sweeper/timer/5s
|
||||
schedule clear fz:sweeper/timer/10s
|
||||
schedule clear fz:sweeper/timer/30s
|
||||
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 minecraft:fz.sweeper visible true
|
||||
|
||||
function fz:sweeper/main
|
||||
function fz:sweeper/bossbar
|
||||
@@ -0,0 +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 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
|
||||
@@ -0,0 +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
|
||||
@@ -0,0 +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[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
|
||||
scoreboard players operation sweeperBossbar parameter = sweeperTime parameter
|
||||
@@ -0,0 +1,16 @@
|
||||
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
|
||||
schedule clear fz:sweeper/timer/4s
|
||||
schedule clear fz:sweeper/timer/5s
|
||||
schedule clear fz:sweeper/timer/10s
|
||||
schedule clear fz:sweeper/timer/30s
|
||||
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"}
|
||||
@@ -0,0 +1,3 @@
|
||||
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
|
||||
@@ -0,0 +1,3 @@
|
||||
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
|
||||
@@ -0,0 +1,3 @@
|
||||
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
|
||||
@@ -0,0 +1,3 @@
|
||||
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
|
||||
@@ -0,0 +1,3 @@
|
||||
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
|
||||
@@ -0,0 +1,3 @@
|
||||
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
|
||||
@@ -0,0 +1,3 @@
|
||||
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
|
||||
@@ -0,0 +1,3 @@
|
||||
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
|
||||
@@ -0,0 +1,3 @@
|
||||
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
|
||||
@@ -0,0 +1,3 @@
|
||||
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
|
||||
@@ -0,0 +1,3 @@
|
||||
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
|
||||
@@ -0,0 +1,17 @@
|
||||
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
|
||||
schedule clear fz:sweeper/timer/4s
|
||||
schedule clear fz:sweeper/timer/5s
|
||||
schedule clear fz:sweeper/timer/10s
|
||||
schedule clear fz:sweeper/timer/30s
|
||||
schedule clear fz:sweeper/timer/1min
|
||||
schedule clear fz:sweeper/timer/2min
|
||||
schedule clear fz:sweeper/timer/3min
|
||||
schedule clear fz:sweeper/timer/4min
|
||||
|
||||
data merge storage fz.installed {sweeper: 0b}
|
||||
#提示已卸载
|
||||
tellraw @a {"text": "[信息]扫地机已卸载","color": "#5fff00"}
|
||||
Reference in New Issue
Block a user