Add files via upload

This commit is contained in:
Harveykang
2020-02-14 12:47:11 +08:00
committed by GitHub
parent 923d1cd39a
commit 354af4082d
41 changed files with 295 additions and 1 deletions
@@ -0,0 +1,2 @@
tag @s remove displayCleanerBossBar
tellraw @s {"text":"您已关闭扫地姬的血条栏提示"}
@@ -0,0 +1,2 @@
tag @s add displayCleanerBossBar
tellraw @s {"text":"您已开启扫地姬的血条栏提示"}
@@ -0,0 +1,2 @@
tag @s add noDisplayCleanerChat
tellraw @s {"text":"您已关闭扫地姬的聊天栏提示"}
@@ -0,0 +1,2 @@
tag @s remove noDisplayCleanerChat
tellraw @s {"text":"您已开启扫地姬的聊天栏提示"}
@@ -0,0 +1,5 @@
execute if score cleaner cleanerBooleans matches 1 run tellraw @a [{"text":"扫地姬已关闭~","color":"green"}]
bossbar set cleaner visible false
scoreboard players set cleaner cleanerBooleans 0
scoreboard players set cleaner setCleanTime 0
scoreboard players set cleaner displayCleanTime 0
@@ -0,0 +1,17 @@
scoreboard players operation cleaner displayCleanTime = @s cleaner
scoreboard players operation cleaner setCleanTime = @s cleaner
scoreboard players operation cleaner setCleanTime *= 20 20
scoreboard players operation cleaner timeCounter = cleaner setCleanTime
tellraw @a [{"selector":"@s"},{"text":"已开启扫地姬~","color":"green"},{"score":{"objective":"displayCleanTime","name":"cleaner"},"color":"dark_aqua","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"游戏秒后清理掉落物~","color":"yellow"}]
scoreboard players set cleaner cleanerBooleans 1
execute if score cleaner setCleanTime matches 5401.. run function fz:cleaner/time/5min
execute if score cleaner setCleanTime matches 4801..5400 run function fz:cleaner/time/4min30s
execute if score cleaner setCleanTime matches 4201..4800 run function fz:cleaner/time/4min
execute if score cleaner setCleanTime matches 3601..4200 run function fz:cleaner/time/3min30s
execute if score cleaner setCleanTime matches 3001..3600 run function fz:cleaner/time/3min
execute if score cleaner setCleanTime matches 2401..3000 run function fz:cleaner/time/2min30s
execute if score cleaner setCleanTime matches 1801..2400 run function fz:cleaner/time/2min
execute if score cleaner setCleanTime matches 1201..1800 run function fz:cleaner/time/1min30s
execute if score cleaner setCleanTime matches 601..1200 run function fz:cleaner/time/60s
execute if score cleaner setCleanTime matches ..600 run function fz:cleaner/time/30s
bossbar set cleaner visible true
@@ -0,0 +1,2 @@
tag @s add noCleanerSound
tellraw @s {"text":"您已关闭扫地姬的声音提示"}
@@ -0,0 +1,2 @@
tag @s remove noCleanerSound
tellraw @s {"text":"您已开启扫地姬的声音提示"}
@@ -0,0 +1,10 @@
scoreboard objectives add cleaner trigger
scoreboard objectives add cleaned dummy
scoreboard objectives add cleanerBooleans dummy
scoreboard objectives add setCleanTime dummy
scoreboard objectives add displayCleanTime dummy
scoreboard objectives add secondsCounter dummy
scoreboard objectives add cleanerMessage trigger
bossbar add cleaner 1
bossbar set cleaner max 60
scoreboard players set cleaner installed 1
+28
View File
@@ -0,0 +1,28 @@
scoreboard players operation cleaner secondsCounter = cleaner timeCounter
scoreboard players operation cleaner secondsCounter /= 20 20
scoreboard players operation cleaner secondsCounter += 1 1
bossbar set cleaner players @a[tag=displayCleanerBossBar]
bossbar set cleaner name [{"text":"扫地姬倒计时:"},{"score":{"objective":"secondsCounter","name":"cleaner"},"bold":true},{"text":"游戏秒后清理"}]
execute if score cleaner timeCounter matches ..0 run function fz:cleaner/subclean
execute if score cleaner timeCounter matches 6000 run function fz:cleaner/time/5min
execute if score cleaner timeCounter matches 6000 run tellraw @a[tag=!noDisplayCleanerChat] [{"text":"5游戏分后清理掉落物~","color":"green"}]
execute if score cleaner timeCounter matches 5400 run function fz:cleaner/time/4min30s
execute if score cleaner timeCounter matches 4800 run function fz:cleaner/time/4min
execute if score cleaner timeCounter matches 4200 run function fz:cleaner/time/3min30s
execute if score cleaner timeCounter matches 3600 run function fz:cleaner/time/3min
execute if score cleaner timeCounter matches 3600 run tellraw @a[tag=!noDisplayCleanerChat] [{"text":"3游戏分后清理掉落物~","color":"green"}]
execute if score cleaner timeCounter matches 3000 run function fz:cleaner/time/2min30s
execute if score cleaner timeCounter matches 2400 run function fz:cleaner/time/2min
execute if score cleaner timeCounter matches 2400 run tellraw @a[tag=!noDisplayCleanerChat] [{"text":"2游戏分后清理掉落物~","color":"yellow"}]
execute if score cleaner timeCounter matches 1800 run function fz:cleaner/time/1min30s
execute if score cleaner timeCounter matches 1200 run function fz:cleaner/time/60s
execute if score cleaner timeCounter matches 1200 run tellraw @a[tag=!noDisplayCleanerChat] [{"text":"60游戏秒后清理掉落物~","color":"gold"}]
execute if score cleaner timeCounter matches 600 run function fz:cleaner/time/30s
execute if score cleaner timeCounter matches 600 run tellraw @a[tag=!noDisplayCleanerChat] [{"text":"30游戏秒后清理掉落物~","color":"red"}]
execute if score cleaner timeCounter matches 200 run function fz:cleaner/time/10s
execute if score cleaner timeCounter matches 100 run function fz:cleaner/time/5s
execute if score cleaner timeCounter matches 80 run function fz:cleaner/time/4s
execute if score cleaner timeCounter matches 60 run function fz:cleaner/time/3s
execute if score cleaner timeCounter matches 40 run function fz:cleaner/time/2s
execute if score cleaner timeCounter matches 20 run function fz:cleaner/time/1s
scoreboard players remove cleaner timeCounter 1
@@ -0,0 +1,15 @@
execute store result score cleaned cleaned run kill @e[type=item]
tellraw @a [{"text":"这次一共清理了","color":"dark_green","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"score":{"objective":"cleaned","name":"cleaned"},"color":"yellow","bold":true,"italic":false,"underlined":true,"strikethrough":false,"obfuscated":false},{"text":"堆物品~","color":"dark_green","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"下次清理将在","color":"yellow"},{"score":{"objective":"displayCleanTime","name":"cleaner"},"color":"dark_aqua","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"游戏秒后开始~","color":"yellow"}]
scoreboard players reset cleaned cleaned
execute if score cleaner setCleanTime matches 5401.. run function fz:cleaner/time/5min
execute if score cleaner setCleanTime matches 4801..5400 run function fz:cleaner/time/4min30s
execute if score cleaner setCleanTime matches 4201..4800 run function fz:cleaner/time/4min
execute if score cleaner setCleanTime matches 3601..4200 run function fz:cleaner/time/3min30s
execute if score cleaner setCleanTime matches 3001..3600 run function fz:cleaner/time/3min
execute if score cleaner setCleanTime matches 2401..3000 run function fz:cleaner/time/2min30s
execute if score cleaner setCleanTime matches 1801..2400 run function fz:cleaner/time/2min
execute if score cleaner setCleanTime matches 1201..1800 run function fz:cleaner/time/1min30s
execute if score cleaner setCleanTime matches 601..1200 run function fz:cleaner/time/60s
execute if score cleaner setCleanTime matches ..600 run function fz:cleaner/time/30s
scoreboard players operation cleaner timeCounter = cleaner setCleanTime
execute as @a[tag=!noCleanerSound] at @s run playsound minecraft:block.note_block.pling player @s ~ ~ ~ 1 2
@@ -0,0 +1,14 @@
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..}] run function fz:cleaner/cleaneron
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
@@ -0,0 +1,7 @@
scoreboard objectives remove cleaner
scoreboard objectives remove cleaned
scoreboard objectives remove cleanerBooleans
scoreboard objectives remove setCleanTime
scoreboard objectives remove displayCleanTime
scoreboard objectives remove cleanerMessage
bossbar remove cleaner