From 3d1606801908145f23ce6a877d752fcc353a9386 Mon Sep 17 00:00:00 2001 From: _Nik0__ Date: Mon, 2 Sep 2024 18:31:30 +0200 Subject: [PATCH] DP | No Votes Logic --- .../function/__private__/if_else/4.mcfunction | 1 + .../data/nnb_main/function/reset_round.mcfunction | 1 + nnb_main/main.jmc | 14 ++++++++++++-- 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 nnb_main/data/nnb_main/function/reset_round.mcfunction diff --git a/nnb_main/data/nnb_main/function/__private__/if_else/4.mcfunction b/nnb_main/data/nnb_main/function/__private__/if_else/4.mcfunction index 491863b..e8c474e 100644 --- a/nnb_main/data/nnb_main/function/__private__/if_else/4.mcfunction +++ b/nnb_main/data/nnb_main/function/__private__/if_else/4.mcfunction @@ -16,5 +16,6 @@ execute if score map nn_map_vote_3 < map nn_map_vote_2 run tag @e[tag=map_3] rem tellraw @a [{"text":" \u2139 | Most voted map: ","color":"gray"},{"selector":"@e[tag=sel]","color":"yellow"}] scoreboard players set min nn_lobby 0 scoreboard players set sec nn_lobby 10 +execute unless entity @e[tag=sel] run function nnb_main:reset_round tellraw @a {"text":" \u2139 | Map has been loaded!","color":"gray","type":"text"} scoreboard players set start_timer nn_lobby 0 \ No newline at end of file diff --git a/nnb_main/data/nnb_main/function/reset_round.mcfunction b/nnb_main/data/nnb_main/function/reset_round.mcfunction new file mode 100644 index 0000000..91693e9 --- /dev/null +++ b/nnb_main/data/nnb_main/function/reset_round.mcfunction @@ -0,0 +1 @@ +tellraw @s " \u26a0 | No Votes - Restarting" \ No newline at end of file diff --git a/nnb_main/main.jmc b/nnb_main/main.jmc index 0b53548..c8b9181 100644 --- a/nnb_main/main.jmc +++ b/nnb_main/main.jmc @@ -167,7 +167,8 @@ function round_manager() { scoreboard players set min nn_lobby 0; scoreboard players set sec nn_lobby 10; - + // No votes + execute unless entity @e[tag=sel] run reset_round(); Text.tellraw(@a, "& ℹ | Map has been loaded!"); scoreboard players set start_timer nn_lobby 0; // Stop the timer @@ -177,8 +178,17 @@ function round_manager() { -// 💀 Handle French People (fr tho handle voting stuff) + +// 🔄️ No Votes - Reset Round +function reset_round() { + Text.tellraw(@s, " ⚠ | No Votes - Restarting"); + coreboard players set start_timer nn_lobby 0; + scoreboard players set phase nn_lobby 4; +} + + +// 💀 Handle French People (fr tho handle voting stuff) function handle_french() { // 3