fz-survival-datapack/data/fz/functions/cleaner/trigger.mcfunction
2020-03-21 21:07:15 +08:00

15 lines
1.3 KiB
Mcfunction
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

scoreboard players enable @a cleaner
scoreboard players enable @a cleanerMessage
execute as @a[scores={cleaner=..-1}] run function fz:cleaner/cleaneroff
execute as @a[scores={cleaner=1..29}] run tellraw @s [{"text":"请输入>=30的时间(单位:秒)","color":"dark_red"}]
execute as @a[scores={cleaner=30..107374182}] run function fz:cleaner/cleaneron
execute as @a[scores={cleaner=107374183..}] run tellraw @s [{"text":"数值溢出不能大于107374182","color":"dark_red"}]
execute as @a[scores={cleanerMessage=1},tag=noDisplayCleanerChat] run function fz:cleaner/cleanerchaton
execute as @a[scores={cleanerMessage=-1},tag=!noDisplayCleanerChat] run function fz:cleaner/cleanerchatoff
execute as @a[scores={cleanerMessage=2},tag=!displayCleanerBossBar] run function fz:cleaner/cleanerbaron
execute as @a[scores={cleanerMessage=-2},tag=displayCleanerBossBar] run function fz:cleaner/cleanerbaroff
execute as @a[scores={cleanerMessage=3},tag=noCleanerSound] run function fz:cleaner/cleanersoundon
execute as @a[scores={cleanerMessage=-3},tag=!noCleanerSound] run function fz:cleaner/cleanersoundoff
scoreboard players reset @a[scores={cleaner=..-1}] cleaner
scoreboard players reset @a[scores={cleaner=1..}] cleaner
execute if score cleaner cleanerBooleans matches 1 run function fz:cleaner/main