diff --git a/data/fz/functions/carpet/scarpet.mcfunction b/data/fz/functions/carpet/scarpet.mcfunction index 4fb39b5..6ca8377 100644 --- a/data/fz/functions/carpet/scarpet.mcfunction +++ b/data/fz/functions/carpet/scarpet.mcfunction @@ -1,2 +1,2 @@ #带标签的假玩家# -script run __command() -> ( help() ); help() ->( print('使用帮助:'); print('/script invoke summon xxx生成玩家'); print('/script invoke kill xxx删除玩家'); print('/script invoke tp xxx x y z,传送假玩家,xyz可替换为\"s\"来代表你的位置'); print('/script invoke killall删除全部玩家'); print('tagplayer Version: 0.0.0-SNAPSHOT-20200106.2207'); '' ); __config() -> m( l('stay_loaded', true)); global_tag = 'carpetBot'; global_tag_no_bot = 'noCarpetBot'; __check_offline(player_name) ->( if (!(player (player_name)), exit('§4假人'+player_name+'未在线'); '' ); if (!query(player(player_name),'has_tag',global_tag), exit('§4'+player_name+'不是假人'); '' ); ); __check_online(player_name) ->( if (player(player_name), if (query(player(player_name),'has_tag',global_tag), exit('§4假人'+player_name+'已经在线了'); '' ); exit('§4玩家'+player_name+'已经在线了'); '' ); ); __check_pos(x) ->( x = number(x); if(x == null, exit('§4请输入正确的坐标'); '' ); return(x) ); __check_tick(tick) ->( tick = str('%d',number(tick+0.5)); if(tick == null, exit('§4请输入正确的游戏刻间隔'); '' ); if(tick < 2, exit(str('§4整数不能小于2,却发现了%d',tick)); '' ); return(tick) ); summon(player_name) ->( s_player = player(); player_name = replace(player_name, '\\s',''); __check_online(player_name); run(str('player %s spawn at %f %f %f', player_name, s_player~'x', s_player~'y', s_player~'z')); if (!(player(player_name)), exit('§4生成失败') ); if(query(player(player_name),'has_tag',global_tag_no_bot), modify(player(player_name),'clear_tag',global_tag_no_bot) ); modify(player(player_name), 'tag', global_tag); print('已为'+player_name+'添加标签 '); '' ); kill(player_name) ->( player_name = replace(player_name, '\\s',''); __check_offline(player_name); modify(player(player_name), 'tag', global_tag_no_bot); print('已将'+player(player_name)+'移交§6FZ\'sDataPack§f清除标签'); run(str('player %s kill', player_name)); game_tick(50); if(player(player_name), exit( modify(player(player_name), 'tag', global_tag); print('§4清除失败'); print('已重新添加'+player_name+'的标签'); '' ); ); print('已清除'+player_name); '' ); killall() ->( i = 0; player_list = player('all'); loop(2147483647,,, one_player = slice(player_list,i,i+1); one_player_str = join('',one_player); if(one_player_str=='', break() ); if(query(player(one_player_str),'has_tag',global_tag), do_fake_player = 1; modify(player(one_player_str), 'tag', global_tag_no_bot); run(str('player %s kill', one_player_str)); ); i = i+1; ); if(do_fake_player != 1, exit('§4不存在假人'); '' ); print('已将全部假人移交§6FZ\'sDataPack§f清除标签'); game_tick(50); print('已清除全部假人'); '' ); tp(player_name,x,y,z) ->( __check_offline(player_name); s_player = player(); if(x == 's', x = s_player~'x' ); if(y == 's', y = s_player~'y' ); if(z == 's', z = s_player~'z' ); x = __check_pos(x); y = __check_pos(y); z = __check_pos(z); run(str('tp %s %f %f %f', player_name, x, y, z)); '' ); \ No newline at end of file +script run __command() -> ( help() ); help() ->( print('使用帮助:'); print('/script invoke summon xxx生成玩家'); print('/script invoke kill xxx删除玩家'); print('/script invoke tp xxx x y z,传送假玩家,xyz可替换为\"s\"来代表你的位置'); print('/script invoke killall删除全部玩家'); print('tagplayer Version: 0.0.0-SNAPSHOT-20200106.2207'); '' ); __config() -> m( l('stay_loaded', true)); global_tag = 'carpetBot'; global_tag_no_bot = 'noCarpetBot'; __check_offline(player_name) ->( if (!(player (player_name)), exit('§4假人'+player_name+'未在线'); '' ); if (!query(player(player_name),'has_tag',global_tag), exit('§4'+player_name+'不是假人'); '' ); ); __check_online(player_name) ->( if (player(player_name), if (query(player(player_name),'has_tag',global_tag), exit('§4假人'+player_name+'已经在线了'); '' ); exit('§4玩家'+player_name+'已经在线了'); '' ); ); __check_pos(x) ->( x = number(x); if(x == null, exit('§4请输入正确的坐标'); '' ); return(x) ); __check_tick(tick) ->( tick = str('%d',number(tick+0.5)); if(tick == null, exit('§4请输入正确的游戏刻间隔'); '' ); if(tick < 2, exit(str('§4整数不能小于2,却发现了%d',tick)); '' ); return(tick) ); summon(player_name) ->( s_player = player(); player_name = replace(player_name, '\\s',''); __check_online(player_name); run(str('player %s spawn at %f %f %f', player_name, s_player~'x', s_player~'y', s_player~'z')); if (!(player(player_name)), exit('§4生成失败') ); if(query(player(player_name),'has_tag',global_tag_no_bot), modify(player(player_name),'clear_tag',global_tag_no_bot) ); modify(player(player_name), 'tag', global_tag); print('已为'+player_name+'添加标签 '); '' ); kill(player_name) ->( player_name = replace(player_name, '\\s',''); __check_offline(player_name); modify(player(player_name), 'tag', global_tag_no_bot); print('已将'+player(player_name)+'移交§6FZ\'sDataPack§f清除标签'); run(str('player %s kill', player_name)); game_tick(50); if(player(player_name), exit( modify(player(player_name), 'tag', global_tag); print('§4清除失败'); print('已重新添加'+player_name+'的标签'); '' ); ); print('已清除'+player_name); '' ); killall() ->( i = 0; player_list = player('all'); loop(2147483647,,, one_player = slice(player_list,i,i+1); one_player_str = join('',one_player); if(one_player_str=='', break() ); if(query(player(one_player_str),'has_tag',global_tag), do_fake_player = 1; modify(player(one_player_str), 'tag', global_tag_no_bot) );run(str('player %s kill', one_player_str)); i = i+1; ); if(do_fake_player != 1, exit('§4不存在假人'); '' ); print('已将全部假人移交§6FZ\'sDataPack§f清除标签'); game_tick(50); print('已清除全部假人'); '' ); tp(player_name,x,y,z) ->( __check_offline(player_name); s_player = player(); if(x == 's', x = s_player~'x' ); if(y == 's', y = s_player~'y' ); if(z == 's', z = s_player~'z' ); x = __check_pos(x); y = __check_pos(y); z = __check_pos(z); run(str('tp %s %f %f %f', player_name, x, y, z)); '' ); \ No newline at end of file diff --git a/data/fz/functions/cleaner/cleanerbaroff.mcfunction b/data/fz/functions/cleaner/cleanerbaroff.mcfunction new file mode 100644 index 0000000..a548ea8 --- /dev/null +++ b/data/fz/functions/cleaner/cleanerbaroff.mcfunction @@ -0,0 +1,2 @@ +tag @s remove displayCleanerBossBar +tellraw @s {"text":"您已关闭扫地姬的血条栏提示"} \ No newline at end of file diff --git a/data/fz/functions/cleaner/cleanerbaron.mcfunction b/data/fz/functions/cleaner/cleanerbaron.mcfunction new file mode 100644 index 0000000..3a0bf33 --- /dev/null +++ b/data/fz/functions/cleaner/cleanerbaron.mcfunction @@ -0,0 +1,2 @@ +tag @s add displayCleanerBossBar +tellraw @s {"text":"您已开启扫地姬的血条栏提示"} \ No newline at end of file diff --git a/data/fz/functions/cleaner/cleanerchatoff.mcfunction b/data/fz/functions/cleaner/cleanerchatoff.mcfunction new file mode 100644 index 0000000..b9adba0 --- /dev/null +++ b/data/fz/functions/cleaner/cleanerchatoff.mcfunction @@ -0,0 +1,2 @@ +tag @s add noDisplayCleanerChat +tellraw @s {"text":"您已关闭扫地姬的聊天栏提示"} \ No newline at end of file diff --git a/data/fz/functions/cleaner/cleanerchaton.mcfunction b/data/fz/functions/cleaner/cleanerchaton.mcfunction new file mode 100644 index 0000000..b9334bf --- /dev/null +++ b/data/fz/functions/cleaner/cleanerchaton.mcfunction @@ -0,0 +1,2 @@ +tag @s remove noDisplayCleanerChat +tellraw @s {"text":"您已开启扫地姬的聊天栏提示"} \ No newline at end of file diff --git a/data/fz/functions/cleaner/cleaneroff.mcfunction b/data/fz/functions/cleaner/cleaneroff.mcfunction index 6a1fe87..c3c7e23 100644 --- a/data/fz/functions/cleaner/cleaneroff.mcfunction +++ b/data/fz/functions/cleaner/cleaneroff.mcfunction @@ -1,4 +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 \ No newline at end of file diff --git a/data/fz/functions/cleaner/cleaneron.mcfunction b/data/fz/functions/cleaner/cleaneron.mcfunction index 6c7e752..5d17862 100644 --- a/data/fz/functions/cleaner/cleaneron.mcfunction +++ b/data/fz/functions/cleaner/cleaneron.mcfunction @@ -1,6 +1,17 @@ -scoreboard players operation cleaner displayCleanTime = @a[scores={cleaner=30..}] cleaner -scoreboard players operation cleaner setCleanTime = @a[scores={cleaner=30..}] cleaner +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 [{"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 \ No newline at end of file +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 \ No newline at end of file diff --git a/data/fz/functions/cleaner/install.mcfunction b/data/fz/functions/cleaner/install.mcfunction index 9e66f10..644ea73 100644 --- a/data/fz/functions/cleaner/install.mcfunction +++ b/data/fz/functions/cleaner/install.mcfunction @@ -2,4 +2,9 @@ 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 \ No newline at end of file +scoreboard objectives add displayCleanTime dummy +scoreboard objectives add secondsCounter dummy +scoreboard objectives add cleanerBar trigger +scoreboard objectives add cleanerChat trigger +bossbar add cleaner 1 +bossbar set cleaner max 60 \ No newline at end of file diff --git a/data/fz/functions/cleaner/main.mcfunction b/data/fz/functions/cleaner/main.mcfunction index f2a321e..f4ad894 100644 --- a/data/fz/functions/cleaner/main.mcfunction +++ b/data/fz/functions/cleaner/main.mcfunction @@ -1,13 +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 tellraw @a [{"text":"5游戏分后清理掉落物~","color":"gold"}] -execute if score cleaner timeCounter matches 3600 run tellraw @a [{"text":"3游戏分后清理掉落物~","color":"gold"}] -execute if score cleaner timeCounter matches 2400 run tellraw @a [{"text":"2游戏分后清理掉落物~","color":"gold"}] -execute if score cleaner timeCounter matches 1200 run tellraw @a [{"text":"60游戏秒后清理掉落物~小伙伴们抓紧时间rua!","color":"gold"}] -execute if score cleaner timeCounter matches 600 run tellraw @a [{"text":"30游戏秒后清理掉落物~搞事的先停停rua!","color":"red"}] -execute if score cleaner timeCounter matches 200 run tellraw @a [{"text":"注意!","color":"dark_red","bold":false,"underlined":false},{"text":"10","color":"red","bold":true,"underlined":true},{"text":"游戏秒后清理掉落物~准备干活咯!","color":"dark_red","bold":false,"underlined":false}] -execute if score cleaner timeCounter matches 100 run tellraw @a [{"text":"注意!","color":"dark_red","bold":false,"underlined":false},{"text":"5","color":"red","bold":true,"underlined":true},{"text":"游戏秒后清理掉落物~","color":"dark_red","bold":false,"underlined":false}] -execute if score cleaner timeCounter matches 80 run tellraw @a [{"text":"注意!","color":"dark_red","bold":false,"underlined":false},{"text":"4","color":"red","bold":true,"underlined":true},{"text":"游戏秒后清理掉落物~","color":"dark_red","bold":false,"underlined":false}] -execute if score cleaner timeCounter matches 60 run tellraw @a [{"text":"注意!","color":"dark_red","bold":false,"underlined":false},{"text":"3","color":"red","bold":true,"underlined":true},{"text":"游戏秒后清理掉落物~","color":"dark_red","bold":false,"underlined":false}] -execute if score cleaner timeCounter matches 40 run tellraw @a [{"text":"注意!","color":"dark_red","bold":false,"underlined":false},{"text":"2","color":"red","bold":true,"underlined":true},{"text":"游戏秒后清理掉落物~","color":"dark_red","bold":false,"underlined":false}] -execute if score cleaner timeCounter matches 20 run tellraw @a [{"text":"注意!","color":"dark_red","bold":false,"underlined":false},{"text":"1","color":"red","bold":true,"underlined":true},{"text":"游戏秒后清理掉落物~","color":"dark_red","bold":false,"underlined":false}] +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 \ No newline at end of file diff --git a/data/fz/functions/cleaner/subclean.mcfunction b/data/fz/functions/cleaner/subclean.mcfunction index 151d50c..132faee 100644 --- a/data/fz/functions/cleaner/subclean.mcfunction +++ b/data/fz/functions/cleaner/subclean.mcfunction @@ -1,4 +1,14 @@ 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 set cleaned cleaned 0 +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 \ No newline at end of file diff --git a/data/fz/functions/cleaner/time/10s.mcfunction b/data/fz/functions/cleaner/time/10s.mcfunction new file mode 100644 index 0000000..a3ab149 --- /dev/null +++ b/data/fz/functions/cleaner/time/10s.mcfunction @@ -0,0 +1,4 @@ +tellraw @a[tag=!noDisplayCleanerChat] [{"text":"注意!","color":"dark_red","bold":false,"underlined":false},{"text":"10","color":"red","bold":true,"underlined":true},{"text":"游戏秒后清理掉落物~准备干活咯!","color":"dark_red","bold":false,"underlined":false}] +bossbar set cleaner style notched_6 +bossbar set cleaner color red +bossbar set cleaner value 60 \ No newline at end of file diff --git a/data/fz/functions/cleaner/time/1min30s.mcfunction b/data/fz/functions/cleaner/time/1min30s.mcfunction new file mode 100644 index 0000000..c5ec1c6 --- /dev/null +++ b/data/fz/functions/cleaner/time/1min30s.mcfunction @@ -0,0 +1,3 @@ +bossbar set cleaner style notched_10 +bossbar set cleaner color green +bossbar set cleaner value 18 \ No newline at end of file diff --git a/data/fz/functions/cleaner/time/1s.mcfunction b/data/fz/functions/cleaner/time/1s.mcfunction new file mode 100644 index 0000000..de2deb6 --- /dev/null +++ b/data/fz/functions/cleaner/time/1s.mcfunction @@ -0,0 +1,4 @@ +tellraw @a[tag=!noDisplayCleanerChat] [{"text":"注意!","color":"dark_red","bold":false,"underlined":false},{"text":"1","color":"red","bold":true,"underlined":true},{"text":"游戏秒后清理掉落物~准备干活咯!","color":"dark_red","bold":false,"underlined":false}] +bossbar set cleaner style notched_6 +bossbar set cleaner color red +bossbar set cleaner value 10 \ No newline at end of file diff --git a/data/fz/functions/cleaner/time/2min.mcfunction b/data/fz/functions/cleaner/time/2min.mcfunction new file mode 100644 index 0000000..434529b --- /dev/null +++ b/data/fz/functions/cleaner/time/2min.mcfunction @@ -0,0 +1,3 @@ +bossbar set cleaner style notched_10 +bossbar set cleaner color green +bossbar set cleaner value 24 \ No newline at end of file diff --git a/data/fz/functions/cleaner/time/2min30s.mcfunction b/data/fz/functions/cleaner/time/2min30s.mcfunction new file mode 100644 index 0000000..b5a83b7 --- /dev/null +++ b/data/fz/functions/cleaner/time/2min30s.mcfunction @@ -0,0 +1,3 @@ +bossbar set cleaner style notched_10 +bossbar set cleaner color green +bossbar set cleaner value 30 \ No newline at end of file diff --git a/data/fz/functions/cleaner/time/2s.mcfunction b/data/fz/functions/cleaner/time/2s.mcfunction new file mode 100644 index 0000000..23b8acc --- /dev/null +++ b/data/fz/functions/cleaner/time/2s.mcfunction @@ -0,0 +1,4 @@ +tellraw @a[tag=!noDisplayCleanerChat] [{"text":"注意!","color":"dark_red","bold":false,"underlined":false},{"text":"2","color":"red","bold":true,"underlined":true},{"text":"游戏秒后清理掉落物~准备干活咯!","color":"dark_red","bold":false,"underlined":false}] +bossbar set cleaner style notched_6 +bossbar set cleaner color red +bossbar set cleaner value 20 \ No newline at end of file diff --git a/data/fz/functions/cleaner/time/30s.mcfunction b/data/fz/functions/cleaner/time/30s.mcfunction new file mode 100644 index 0000000..fb2266e --- /dev/null +++ b/data/fz/functions/cleaner/time/30s.mcfunction @@ -0,0 +1,4 @@ +bossbar set cleaner style notched_10 +bossbar set cleaner color yellow +bossbar set cleaner value 6 +bossbar set cleaner visible true \ No newline at end of file diff --git a/data/fz/functions/cleaner/time/3min.mcfunction b/data/fz/functions/cleaner/time/3min.mcfunction new file mode 100644 index 0000000..89c3218 --- /dev/null +++ b/data/fz/functions/cleaner/time/3min.mcfunction @@ -0,0 +1,3 @@ +bossbar set cleaner style notched_10 +bossbar set cleaner color green +bossbar set cleaner value 36 \ No newline at end of file diff --git a/data/fz/functions/cleaner/time/3min30s.mcfunction b/data/fz/functions/cleaner/time/3min30s.mcfunction new file mode 100644 index 0000000..caf2e5a --- /dev/null +++ b/data/fz/functions/cleaner/time/3min30s.mcfunction @@ -0,0 +1,3 @@ +bossbar set cleaner style notched_10 +bossbar set cleaner color green +bossbar set cleaner value 42 \ No newline at end of file diff --git a/data/fz/functions/cleaner/time/3s.mcfunction b/data/fz/functions/cleaner/time/3s.mcfunction new file mode 100644 index 0000000..d20c7fd --- /dev/null +++ b/data/fz/functions/cleaner/time/3s.mcfunction @@ -0,0 +1,4 @@ +tellraw @a[tag=!noDisplayCleanerChat] [{"text":"注意!","color":"dark_red","bold":false,"underlined":false},{"text":"3","color":"red","bold":true,"underlined":true},{"text":"游戏秒后清理掉落物~准备干活咯!","color":"dark_red","bold":false,"underlined":false}] +bossbar set cleaner style notched_6 +bossbar set cleaner color red +bossbar set cleaner value 30 \ No newline at end of file diff --git a/data/fz/functions/cleaner/time/4min.mcfunction b/data/fz/functions/cleaner/time/4min.mcfunction new file mode 100644 index 0000000..e820bb5 --- /dev/null +++ b/data/fz/functions/cleaner/time/4min.mcfunction @@ -0,0 +1,3 @@ +bossbar set cleaner style notched_10 +bossbar set cleaner color green +bossbar set cleaner value 48 \ No newline at end of file diff --git a/data/fz/functions/cleaner/time/4min30s.mcfunction b/data/fz/functions/cleaner/time/4min30s.mcfunction new file mode 100644 index 0000000..c794965 --- /dev/null +++ b/data/fz/functions/cleaner/time/4min30s.mcfunction @@ -0,0 +1,3 @@ +bossbar set cleaner style notched_10 +bossbar set cleaner color green +bossbar set cleaner value 54 \ No newline at end of file diff --git a/data/fz/functions/cleaner/time/4s.mcfunction b/data/fz/functions/cleaner/time/4s.mcfunction new file mode 100644 index 0000000..5cc52b8 --- /dev/null +++ b/data/fz/functions/cleaner/time/4s.mcfunction @@ -0,0 +1,4 @@ +tellraw @a[tag=!noDisplayCleanerChat] [{"text":"注意!","color":"dark_red","bold":false,"underlined":false},{"text":"4","color":"red","bold":true,"underlined":true},{"text":"游戏秒后清理掉落物~准备干活咯!","color":"dark_red","bold":false,"underlined":false}] +bossbar set cleaner style notched_6 +bossbar set cleaner color red +bossbar set cleaner value 40 \ No newline at end of file diff --git a/data/fz/functions/cleaner/time/5min.mcfunction b/data/fz/functions/cleaner/time/5min.mcfunction new file mode 100644 index 0000000..3a5787c --- /dev/null +++ b/data/fz/functions/cleaner/time/5min.mcfunction @@ -0,0 +1,3 @@ +bossbar set cleaner style notched_10 +bossbar set cleaner color green +bossbar set cleaner value 60 \ No newline at end of file diff --git a/data/fz/functions/cleaner/time/5s.mcfunction b/data/fz/functions/cleaner/time/5s.mcfunction new file mode 100644 index 0000000..ca92381 --- /dev/null +++ b/data/fz/functions/cleaner/time/5s.mcfunction @@ -0,0 +1,4 @@ +tellraw @a[tag=!noDisplayCleanerChat] [{"text":"注意!","color":"dark_red","bold":false,"underlined":false},{"text":"5","color":"red","bold":true,"underlined":true},{"text":"游戏秒后清理掉落物~准备干活咯!","color":"dark_red","bold":false,"underlined":false}] +bossbar set cleaner style notched_6 +bossbar set cleaner color red +bossbar set cleaner value 50 \ No newline at end of file diff --git a/data/fz/functions/cleaner/time/60s.mcfunction b/data/fz/functions/cleaner/time/60s.mcfunction new file mode 100644 index 0000000..779b0a0 --- /dev/null +++ b/data/fz/functions/cleaner/time/60s.mcfunction @@ -0,0 +1,3 @@ +bossbar set cleaner style notched_10 +bossbar set cleaner color yellow +bossbar set cleaner value 12 \ No newline at end of file diff --git a/data/fz/functions/cleaner/trigger.mcfunction b/data/fz/functions/cleaner/trigger.mcfunction index 667d1ca..a1e0fb2 100644 --- a/data/fz/functions/cleaner/trigger.mcfunction +++ b/data/fz/functions/cleaner/trigger.mcfunction @@ -1,7 +1,17 @@ scoreboard players enable @a cleaner -execute if entity @a[scores={cleaner=..-1}] run function fz:cleaner/cleaneroff -execute if entity @a[scores={cleaner=1..29}] run tellraw @a[scores={cleaner=1..29}] [{"text":"请输入>=30的时间(单位:秒)","color":"dark_red"}] -execute if entity @a[scores={cleaner=30..}] run function fz:cleaner/cleaneron -scoreboard players set @a[scores={cleaner=..-1}] cleaner 0 -scoreboard players set @a[scores={cleaner=1..}] cleaner 0 +scoreboard players enable @a cleanerBar +scoreboard players enable @a cleanerChat +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={cleanerChat=1..},tag=noDisplayCleanerChat] run function fz:cleaner/cleanerchaton +execute as @a[scores={cleanerBar=1..},tag=!displayCleanerBossBar] run function fz:cleaner/cleanerbaron +execute as @a[scores={cleanerChat=..-1},tag=!noDisplayCleanerChat] run function fz:cleaner/cleanerchatoff +execute as @a[scores={cleanerBar=..-1},tag=displayCleanerBossBar] run function fz:cleaner/cleanerbaroff +scoreboard players reset @a[scores={cleanerChat=1..}] cleanerChat +scoreboard players reset @a[scores={cleanerBar=1..}] cleanerBar +scoreboard players reset @a[scores={cleanerChat=..-1}] cleanerChat +scoreboard players reset @a[scores={cleanerBar=..-1}] cleanerBar +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 \ No newline at end of file diff --git a/data/fz/functions/cleaner/uninstall.mcfunction b/data/fz/functions/cleaner/uninstall.mcfunction index 02b76cb..7774704 100644 --- a/data/fz/functions/cleaner/uninstall.mcfunction +++ b/data/fz/functions/cleaner/uninstall.mcfunction @@ -2,4 +2,7 @@ scoreboard objectives remove cleaner scoreboard objectives remove cleaned scoreboard objectives remove cleanerBooleans scoreboard objectives remove setCleanTime -scoreboard objectives remove displayCleanTime \ No newline at end of file +scoreboard objectives remove displayCleanTime +scoreboard objectives remove cleanerBar +scoreboard objectives remove cleanerChat +bossbar remove cleaner \ No newline at end of file diff --git a/data/fz/functions/config/configs.mcfunction b/data/fz/functions/config/configs.mcfunction index 1dc1798..3ed3e58 100644 --- a/data/fz/functions/config/configs.mcfunction +++ b/data/fz/functions/config/configs.mcfunction @@ -3,9 +3,16 @@ function fz:noai/configs execute if score carpet carpet matches 1.. run tellraw @s {"text":"--不计入计分板总分的假人--","color":"dark_green","bold":true} execute if score carpet carpet matches 1.. run tellraw @s [{"text":"- 生成假人:"},{"text":"/script invoke summon 玩家名","color":"green","clickEvent":{"action":"suggest_command","value":"/script invoke summon "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}}] execute if score carpet carpet matches 1.. run tellraw @s [{"text":"- 删除假人:"},{"text":"/script invoke kill 玩家名","color":"green","clickEvent":{"action":"suggest_command","value":"/script invoke kill "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}}] -tellraw @s [{"text":"--扫地姬--","color":"dark_green","bold":true}] +execute if score carpet carpet matches 1.. run tellraw @s [{"text":"- 删除全部假人:"},{"text":"/script invoke killall","color":"green","clickEvent":{"action":"suggest_command","value":"/script invoke kill "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}}] +execute if score carpet carpet matches 1.. run tellraw @s [{"text":"- 传送假人:"},{"text":"/script invoke tp xxx x y z","color":"green","clickEvent":{"action":"suggest_command","value":"/script invoke tp "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}},{"text":",xyz可替换为\"s\"来代表你的位置","color":"white"}] +tellraw @s [{"text":"--扫地姬--"}] +tellraw @s [{"text":"- 显示方式"}] +tellraw @s [{"text":" - 血条栏:"},{"text":"[✔]","color":"dark_green","clickEvent":{"action":"run_command","value":"/trigger cleanerBar set 1"}},{"text":"[✘]","color":"dark_red","clickEvent":{"action":"run_command","value":"/trigger cleanerBar set -1"}}] +tellraw @s [{"text":" - 指令:"},{"text":"/trigger cleanerBar set -1为关/1为开","color":"green","clickEvent":{"action":"suggest_command","value":"/trigger cleanerBar set "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}}] +tellraw @s [{"text":" - 聊天栏:"},{"text":"[✔]","color":"dark_green","clickEvent":{"action":"run_command","value":"/trigger cleanerChat set 1"}},{"text":"[✘]","color":"dark_red","clickEvent":{"action":"run_command","value":"/trigger cleanerChat set -1"}}] +tellraw @s [{"text":" - 指令:"},{"text":"/trigger cleanerChat set -1为关/1为开","color":"green","clickEvent":{"action":"suggest_command","value":"/trigger cleanerChat set "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}}] tellraw @s [{"text":"- 指令:"},{"text":"/trigger cleaner set -1为关/秒数(≥30)为开","color":"green","clickEvent":{"action":"suggest_command","value":"/trigger cleaner set "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}}] -tellraw @s [{"text":"- 预设:"},{"text":"[OFF]","color":"dark_red","clickEvent":{"action":"run_command","value":"/trigger cleaner set -1"}},{"text":"[30s]","color":"red","clickEvent":{"action":"run_command","value":"/trigger cleaner set 30"}},{"text":"[1min]","color":"gold","clickEvent":{"action":"run_command","value":"/trigger cleaner set 60"}},{"text":"[2min]","color":"yellow","clickEvent":{"action":"run_command","value":"/trigger cleaner set 120"}},{"text":"[3min]","color":"green","clickEvent":{"action":"run_command","value":"/trigger cleaner set 180"}},{"text":"[5min]","color":"dark_green","clickEvent":{"action":"run_command","value":"/trigger cleaner set 300"}}] +tellraw @s [{"text":"- 预设:"},{"text":"[✘]","color":"dark_red","clickEvent":{"action":"run_command","value":"/trigger cleaner set -1"}},{"text":"[30s]","color":"red","clickEvent":{"action":"run_command","value":"/trigger cleaner set 30"}},{"text":"[1min]","color":"gold","clickEvent":{"action":"run_command","value":"/trigger cleaner set 60"}},{"text":"[2min]","color":"yellow","clickEvent":{"action":"run_command","value":"/trigger cleaner set 120"}},{"text":"[3min]","color":"green","clickEvent":{"action":"run_command","value":"/trigger cleaner set 180"}},{"text":"[5min]","color":"dark_green","clickEvent":{"action":"run_command","value":"/trigger cleaner set 300"}}] tellraw @s {"text":"--记分板--","color":"dark_green","bold":true} tellraw @s [{"text":"- 指令:"},{"text":"/trigger scoreSwitch set -1为关/1-9为开","color":"green","clickEvent":{"action":"suggest_command","value":"/trigger scoreSwitch set "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}}] -tellraw @s [{"text":"[OFF]","color":"dark_red","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set -1"}},{"text":"[轮播]","color":"dark_green","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set 1"}},{"text":"[击杀榜]","color":"red","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set 2"}},{"text":"[挖掘榜]","color":"gray","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set 3"}},{"text":"[死亡榜]","color":"dark_red","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set 4"}},{"text":"[交易榜]","color":"green","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set 5"}},{"text":"[钓鱼榜]","color":"blue","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set 6"}},{"text":"[奥里给!]","color":"yellow","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set 7"}},{"text":"[活跃度]","color":"aqua","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set 8"}},{"text":"[统计总量]","color":"light_purple","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set 9"}}] +tellraw @s [{"text":"[✘]","color":"dark_red","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set -1"}},{"text":"[轮播]","color":"dark_green","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set 1"}},{"text":"[击杀榜]","color":"red","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set 2"}},{"text":"[挖掘榜]","color":"gray","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set 3"}},{"text":"[死亡榜]","color":"dark_red","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set 4"}},{"text":"[交易榜]","color":"green","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set 5"}},{"text":"[钓鱼榜]","color":"blue","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set 6"}},{"text":"[奥里给!]","color":"yellow","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set 7"}},{"text":"[活跃度]","color":"aqua","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set 8"}},{"text":"[统计总量]","color":"light_purple","clickEvent":{"action":"run_command","value":"/trigger scoreSwitch set 9"}}] diff --git a/data/fz/functions/install.mcfunction b/data/fz/functions/install.mcfunction index b5ab126..8492341 100644 --- a/data/fz/functions/install.mcfunction +++ b/data/fz/functions/install.mcfunction @@ -12,9 +12,12 @@ scoreboard players operation version version = version version execute if score version version matches ..132 run function fz:updatebeforeinstall133 execute if score version version matches 133 run function fz:updatebeforeinstall134 #### +gamerule disableElytraMovementCheck true scoreboard objectives add timeCounter dummy scoreboard objectives add 20 dummy +scoreboard objectives add 1 dummy scoreboard players set 20 20 20 +scoreboard players set 1 1 1 function fz:carpet/install function fz:score/install function fz:health/install diff --git a/data/fz/functions/logintips/main.mcfunction b/data/fz/functions/logintips/main.mcfunction index a12d2ec..6c31bf9 100644 --- a/data/fz/functions/logintips/main.mcfunction +++ b/data/fz/functions/logintips/main.mcfunction @@ -1,3 +1,4 @@ +execute as @a unless score @s leaveGame matches -2147483648..2147483647 run scoreboard players operation @s leaveGame = @s leaveGame tellraw @a[scores={leaveGame=0..}] [{"text":"使用"},{"text":"/trigger cleaner set -1或≥30(单位:秒)","underlined":true,"clickEvent":{"action":"suggest_command","value":"/trigger cleaner set "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}},{"text":"来关/开扫地姬"}] tellraw @a[scores={leaveGame=0..}] [{"text":"使用"},{"text":"/trigger scoreswitch set -1或1-9","underlined":true,"clickEvent":{"action":"suggest_command","value":"/trigger scoreswitch set "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}},{"text":"来关/开记分板"}] execute if score carpet carpet matches 1.. run tellraw @a[scores={leaveGame=0..}] [{"text":"务必使用","color":"dark_red"},{"text":"/script invoke summon 玩家名","underlined":true,"color":"red","clickEvent":{"action":"suggest_command","value":"/script invoke summon "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}},{"text":"召唤假人,可以避免将他们计入记分板总分!","color":"dark_red"}] diff --git a/data/fz/functions/score/main.mcfunction b/data/fz/functions/score/main.mcfunction index b7f8a62..5f1fa1b 100644 --- a/data/fz/functions/score/main.mcfunction +++ b/data/fz/functions/score/main.mcfunction @@ -15,31 +15,31 @@ execute if score scoreboard timeCounter matches 4800.. run scoreboard players se #### #记分板开关# scoreboard players enable @a scoreSwitch -execute if entity @a[scores={scoreSwitch=..-1},team=!displayScoresOff] run function fz:score/teams/displayscoresoff -execute if entity @a[scores={scoreSwitch=1},team=!displayScoresOn] run function fz:score/teams/displayscoreson -execute if entity @a[scores={scoreSwitch=2},team=!killCounter] run function fz:score/teams/killcounter -execute if entity @a[scores={scoreSwitch=3},team=!digCounter] run function fz:score/teams/digcounter -execute if entity @a[scores={scoreSwitch=4},team=!deathCounter] run function fz:score/teams/deathcounter -execute if entity @a[scores={scoreSwitch=5},team=!tradingCounter] run function fz:score/teams/tradingcounter -execute if entity @a[scores={scoreSwitch=6},team=!fishingCounter] run function fz:score/teams/fishingcounter -execute if entity @a[scores={scoreSwitch=7},team=!damageTaken] run function fz:score/teams/damagetaken -execute if entity @a[scores={scoreSwitch=8},team=!activation] run function fz:score/teams/activation -execute if entity @a[scores={scoreSwitch=9},team=!totalList] run function fz:score/teams/totallist -execute if entity @a[scores={scoreSwitch=10..}] run tellraw @a[scores={scoreSwitch=10..}] [{"text":"不存在编号为10及以上的记分板","color":"dark_red"}] +execute as @a[scores={scoreSwitch=..-1},team=!displayScoresOff] run function fz:score/teams/displayscoresoff +execute as @a[scores={scoreSwitch=1},team=!displayScoresOn] run function fz:score/teams/displayscoreson +execute as @a[scores={scoreSwitch=2},team=!killCounter] run function fz:score/teams/killcounter +execute as @a[scores={scoreSwitch=3},team=!digCounter] run function fz:score/teams/digcounter +execute as @a[scores={scoreSwitch=4},team=!deathCounter] run function fz:score/teams/deathcounter +execute as @a[scores={scoreSwitch=5},team=!tradingCounter] run function fz:score/teams/tradingcounter +execute as @a[scores={scoreSwitch=6},team=!fishingCounter] run function fz:score/teams/fishingcounter +execute as @a[scores={scoreSwitch=7},team=!damageTaken] run function fz:score/teams/damagetaken +execute as @a[scores={scoreSwitch=8},team=!activation] run function fz:score/teams/activation +execute as @a[scores={scoreSwitch=9},team=!totalList] run function fz:score/teams/totallist +execute as @a[scores={scoreSwitch=10..}] run tellraw @a[scores={scoreSwitch=10..}] [{"text":"不存在编号为10及以上的记分板","color":"dark_red"}] scoreboard players set @a[scores={scoreSwitch=..-1}] scoreSwitch 0 scoreboard players set @a[scores={scoreSwitch=1..}] scoreSwitch 0 team join displayScoresOff @a[team=] #### #添加工具计入挖掘量# -execute if entity @a[scores={diamond_pickaxe=1..}] as @a[scores={diamond_pickaxe=1..}] run function fz:score/tools/diamond_pickaxe -execute if entity @a[scores={iron_pickaxe=1..}] as @a[scores={iron_pickaxe=1..}] run function fz:score/tools/iron_pickaxe -execute if entity @a[scores={stone_pickaxe=1..}] as @a[scores={stone_pickaxe=1..}] run function fz:score/tools/stone_pickaxe -execute if entity @a[scores={diamond_axe=1..}] as @a[scores={diamond_axe=1..}] run function fz:score/tools/diamond_axe -execute if entity @a[scores={iron_axe=1..}] as @a[scores={iron_axe=1..}] run function fz:score/tools/iron_axe -execute if entity @a[scores={stone_axe=1..}] as @a[scores={stone_axe=1..}] run function fz:score/tools/stone_axe -execute if entity @a[scores={diamond_shovel=1..}] as @a[scores={diamond_shovel=1..}] run function fz:score/tools/diamond_shovel -execute if entity @a[scores={iron_shovel=1..}] as @a[scores={iron_shovel=1..}] run function fz:score/tools/iron_shovel -execute if entity @a[scores={stone_shovel=1..}] as @a[scores={stone_shovel=1..}] run function fz:score/tools/stone_shovel +execute as @a[scores={diamond_pickaxe=1..}] run function fz:score/tools/diamond_pickaxe +execute as @a[scores={iron_pickaxe=1..}] run function fz:score/tools/iron_pickaxe +execute as @a[scores={stone_pickaxe=1..}] run function fz:score/tools/stone_pickaxe +execute as @a[scores={diamond_axe=1..}] run function fz:score/tools/diamond_axe +execute as @a[scores={iron_axe=1..}] run function fz:score/tools/iron_axe +execute as @a[scores={stone_axe=1..}] run function fz:score/tools/stone_axe +execute as @a[scores={diamond_shovel=1..}] run function fz:score/tools/diamond_shovel +execute as @a[scores={iron_shovel=1..}] run function fz:score/tools/iron_shovel +execute as @a[scores={stone_shovel=1..}] run function fz:score/tools/stone_shovel #### #计算总量# #给缓存记分板赋初始值 diff --git a/data/fz/functions/score/teams/activation.mcfunction b/data/fz/functions/score/teams/activation.mcfunction index af8b3a6..c0e1732 100644 --- a/data/fz/functions/score/teams/activation.mcfunction +++ b/data/fz/functions/score/teams/activation.mcfunction @@ -1,3 +1,3 @@ -tellraw @a[scores={scoreSwitch=8},team=!activation] [{"text":"您已订阅"},{"text":"活跃度排行(小时)","color":"aqua"}] -team join activation @a[scores={scoreSwitch=8},team=!activation] +tellraw @s [{"text":"您已订阅"},{"text":"活跃度排行(小时)","color":"aqua"}] +team join activation @s scoreboard objectives setdisplay sidebar.team.aqua activation \ No newline at end of file diff --git a/data/fz/functions/score/teams/damagetaken.mcfunction b/data/fz/functions/score/teams/damagetaken.mcfunction index aa1651b..3ebd89a 100644 --- a/data/fz/functions/score/teams/damagetaken.mcfunction +++ b/data/fz/functions/score/teams/damagetaken.mcfunction @@ -1,3 +1,3 @@ -tellraw @a[scores={scoreSwitch=7},team=!damageTaken] [{"text":"您已订阅"},{"text":"老八的彻shuǒ","color":"yellow"}] -team join damageTaken @a[scores={scoreSwitch=7},team=!damageTaken] +tellraw @s [{"text":"您已订阅"},{"text":"老八的彻shuǒ","color":"yellow"}] +team join damageTaken @s scoreboard objectives setdisplay sidebar.team.yellow damageTaken \ No newline at end of file diff --git a/data/fz/functions/score/teams/deathcounter.mcfunction b/data/fz/functions/score/teams/deathcounter.mcfunction index ba6524e..30580db 100644 --- a/data/fz/functions/score/teams/deathcounter.mcfunction +++ b/data/fz/functions/score/teams/deathcounter.mcfunction @@ -1,3 +1,3 @@ -tellraw @a[scores={scoreSwitch=4},team=!deathCounter] [{"text":"您已订阅"},{"text":"死亡榜","color":"dark_red"}] -team join deathCounter @a[scores={scoreSwitch=4},team=!deathCounter] +tellraw @s [{"text":"您已订阅"},{"text":"死亡榜","color":"dark_red"}] +team join deathCounter @s scoreboard objectives setdisplay sidebar.team.dark_red deathCounter \ No newline at end of file diff --git a/data/fz/functions/score/teams/digcounter.mcfunction b/data/fz/functions/score/teams/digcounter.mcfunction index e00f939..1b1b548 100644 --- a/data/fz/functions/score/teams/digcounter.mcfunction +++ b/data/fz/functions/score/teams/digcounter.mcfunction @@ -1,3 +1,3 @@ -tellraw @a[scores={scoreSwitch=3},team=!digCounter] [{"text":"您已订阅"},{"text":"挖掘榜","color":"gray"}] -team join digCounter @a[scores={scoreSwitch=3},team=!digCounter] +tellraw @s [{"text":"您已订阅"},{"text":"挖掘榜","color":"gray"}] +team join digCounter @s scoreboard objectives setdisplay sidebar.team.gray digCounter \ No newline at end of file diff --git a/data/fz/functions/score/teams/displayscoresoff.mcfunction b/data/fz/functions/score/teams/displayscoresoff.mcfunction index 4f8f073..1cad8a8 100644 --- a/data/fz/functions/score/teams/displayscoresoff.mcfunction +++ b/data/fz/functions/score/teams/displayscoresoff.mcfunction @@ -1,2 +1,2 @@ -tellraw @a[scores={scoreSwitch=..-1},team=!displayScoresOff] [{"text":"您已退订记分板"}] -team join displayScoresOff @a[scores={scoreSwitch=..-1},team=!displayScoresOff] \ No newline at end of file +tellraw @s [{"text":"您已退订记分板"}] +team join displayScoresOff @s \ No newline at end of file diff --git a/data/fz/functions/score/teams/displayscoreson.mcfunction b/data/fz/functions/score/teams/displayscoreson.mcfunction index 308b4c4..2da4ec4 100644 --- a/data/fz/functions/score/teams/displayscoreson.mcfunction +++ b/data/fz/functions/score/teams/displayscoreson.mcfunction @@ -1,2 +1,2 @@ -tellraw @a[scores={scoreSwitch=1},team=!displayScoresOn] [{"text":"正在循环播放记分板"}] -team join displayScoresOn @a[scores={scoreSwitch=1},team=!displayScoresOn] \ No newline at end of file +tellraw @s [{"text":"正在循环播放记分板"}] +team join displayScoresOn @s \ No newline at end of file diff --git a/data/fz/functions/score/teams/fishingcounter.mcfunction b/data/fz/functions/score/teams/fishingcounter.mcfunction index f0ba8b8..bc1802d 100644 --- a/data/fz/functions/score/teams/fishingcounter.mcfunction +++ b/data/fz/functions/score/teams/fishingcounter.mcfunction @@ -1,3 +1,3 @@ -tellraw @a[scores={scoreSwitch=6},team=!fishingCounter] [{"text":"您已订阅"},{"text":"钓鱼榜","color":"blue"}] -team join fishingCounter @a[scores={scoreSwitch=6},team=!fishingCounter] +tellraw @s [{"text":"您已订阅"},{"text":"钓鱼榜","color":"blue"}] +team join fishingCounter @s scoreboard objectives setdisplay sidebar.team.blue fishingCounter \ No newline at end of file diff --git a/data/fz/functions/score/teams/killcounter.mcfunction b/data/fz/functions/score/teams/killcounter.mcfunction index b66d8f6..52b11d0 100644 --- a/data/fz/functions/score/teams/killcounter.mcfunction +++ b/data/fz/functions/score/teams/killcounter.mcfunction @@ -1,3 +1,3 @@ -tellraw @a[scores={scoreSwitch=2},team=!killCounter] [{"text":"您已订阅"},{"text":"击杀榜","color":"red"}] -team join killCounter @a[scores={scoreSwitch=2},team=!killCounter] +tellraw @s [{"text":"您已订阅"},{"text":"击杀榜","color":"red"}] +team join killCounter @s scoreboard objectives setdisplay sidebar.team.red killCounter \ No newline at end of file diff --git a/data/fz/functions/score/teams/totallist.mcfunction b/data/fz/functions/score/teams/totallist.mcfunction index ecee7cd..0629201 100644 --- a/data/fz/functions/score/teams/totallist.mcfunction +++ b/data/fz/functions/score/teams/totallist.mcfunction @@ -1,3 +1,3 @@ -tellraw @a[scores={scoreSwitch=9},team=!totalList] [{"text":"您已订阅"},{"text":"统计总量","color":"light_purple"}] -team join totalList @a[scores={scoreSwitch=9},team=!totalList] +tellraw @s [{"text":"您已订阅"},{"text":"统计总量","color":"light_purple"}] +team join totalList @s scoreboard objectives setdisplay sidebar.team.light_purple totalList \ No newline at end of file diff --git a/data/fz/functions/score/teams/tradingcounter.mcfunction b/data/fz/functions/score/teams/tradingcounter.mcfunction index 8c4c059..e7ba576 100644 --- a/data/fz/functions/score/teams/tradingcounter.mcfunction +++ b/data/fz/functions/score/teams/tradingcounter.mcfunction @@ -1,3 +1,3 @@ -tellraw @a[scores={scoreSwitch=5},team=!tradingCounter] [{"text":"您已订阅"},{"text":"交易榜","color":"green"}] -team join tradingCounter @a[scores={scoreSwitch=5},team=!tradingCounter] +tellraw @s [{"text":"您已订阅"},{"text":"交易榜","color":"green"}] +team join tradingCounter @s scoreboard objectives setdisplay sidebar.team.green tradingCounter \ No newline at end of file