Skip to content

Commit

Permalink
DP | Rollback Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Nik0-0 committed Feb 28, 2024
1 parent 48b9277 commit 70f3010
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
function nnb_spawnsystem:map_detect
function nnb_spawnsystem:root map_detect()
execute if score started nn_lobby matches 1 run function nnb_spawnsystem:timer_msec
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ execute store result storage nnb_spawnsystem:temp limit int 1 run scoreboard pla
execute store result storage nnb_spawnsystem:__storage__ switch_key int 1 run scoreboard players get spawn nn_spawn
function nnb_spawnsystem:__private__/switch_case/1/select with storage nnb_spawnsystem:__storage__
scoreboard players remove ticks nn_spawn 1
execute if score ticks nn_spawn matches ..9 run function nnb_spawnsystem:setup_bots with storage nnb_spawnsystem:temp
function nnb_spawnsystem:root with storage nnb_spawnsystem:temp
execute if score ticks nn_spawn matches ..9 run function nnb_spawnsystem:setup_bots with storage nnb_spawnsystem:temp
Original file line number Diff line number Diff line change
@@ -1 +1 @@
execute if score phase nn_lobby matches 5 if score min nn_lobby >= 0 nn_lobby run $bossbar set minecraft:game name [{"score":{"name":"min","objective":"nn_lobby"},"color":"yellow"},{"text":":","color":"yellow"},{"score":{"name":"sec","objective":"nn_lobby"},"color":"yellow"},{"text":" |","color":"dark_gray"},{"text":" Playing $(map)","color":"aqua"}]
execute if score phase nn_lobby matches 5 if score min nn_lobby >= 0 nn_lobby run bossbar set minecraft:game name [{"score":{"name":"min","objective":"nn_lobby"},"color":"yellow"},{"text":":","color":"yellow"},{"score":{"name":"sec","objective":"nn_lobby"},"color":"yellow"},{"text":" |","color":"dark_gray"},{"text":" Playing ","color":"aqua"},{"selector":"@e[tag=now_playing]","color":"gold"}]
32 changes: 15 additions & 17 deletions nnb_spawnsystem/main.jmc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Text.tellraw(@a, "Spawn System Loaded");

// Run Every Tick
function __tick__() {
root()
map_detect();


Expand All @@ -12,7 +13,20 @@ timer_msec();



// Bossbar & Entity Stuff
function root() {

//Detect if round has started
if (nn_lobby:phase = 5) {
// check if minutes are not less than 0
if (nn_lobby:min >= nn_lobby:0) {
// Set the bossbar stuff
bossbar set minecraft:game name [
{"score":{"name":"min","objective":"nn_lobby"},"color":"yellow"},
{"text":":","color":"yellow"},{"score":{"name":"sec","objective":"nn_lobby"},"color":"yellow"},
{"text":" |","color":"dark_gray"},{"text":" Playing ","color":"aqua"},{"selector":"@e[tag=now_playing]","color":"gold"}];

}}}



Expand Down Expand Up @@ -213,10 +227,7 @@ function call_bots() {
scoreboard players remove ticks nn_spawn 1;
if (nn_spawn:ticks < 10) {
setup_bots() with storage nnb_spawnsystem:temp;
}
// Tick the bossbar with the correct info
root() with storage nnb_spawnsystem:temp;
}
}}

// Universal spawn bot stuff
function setup_bots() {
Expand Down Expand Up @@ -249,20 +260,7 @@ function tp_bots() {



// Bossbar & Entity Stuff
function root() {

//Detect if round has started
if (nn_lobby:phase = 5) {
// check if minutes are not less than 0
if (nn_lobby:min >= nn_lobby:0) {
// Set the bossbar stuff
$bossbar set minecraft:game name [
{"score":{"name":"min","objective":"nn_lobby"},"color":"yellow"},
{"text":":","color":"yellow"},{"score":{"name":"sec","objective":"nn_lobby"},"color":"yellow"},
{"text":" |","color":"dark_gray"},{"text":" Playing $(map)","color":"aqua"}];

}}}



Expand Down

0 comments on commit 70f3010

Please sign in to comment.