Skip to content

Commit

Permalink
DP | TP Markers to the stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Nik0-0 committed Sep 4, 2024
1 parent 6c80371 commit 537b124
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions nnb_main/data/nnb_main/function/tp_markers.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$execute at @e[tag=$(Mapname)] run tp @e[tag=player_spawn,limit=1,sort=random] @e[tag=$(Mapname),limit=1,sort=random]
14 changes: 12 additions & 2 deletions nnb_main/main.jmc
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ function round_manager() {
}}


// Load map
// Start Round
if (nn_lobby:phase = 4) {
if (nn_lobby:min < numbers:0) {
scoreboard players set phase nn_lobby 5;
Expand All @@ -197,6 +197,12 @@ function round_manager() {
// Since that doesn't work we need to use good old command blocks in the world - mvload @e[tag=sel];
execute at @e[tag=load_maps] run setblock ~ ~ ~ minecraft:redstone_block;


// Important stuff
// /scoreboard players set started nn_lobby 0/1 - Starts the round
// /scoreboard players set disable nn_spawn 0/1 - Enables the spawner
// /scoreboard players set prepare nn_lobby 0/1 - Prepare phase

scoreboard players set start_timer nn_lobby 0; // Stop the timer
}}

Expand All @@ -206,6 +212,7 @@ function round_manager() {




// 🔄️ No Votes - Reset Round
function reset_round() {
Text.tellraw(@a, "&<yellow> ⚠ | No Votes - Restarting");
Expand Down Expand Up @@ -374,7 +381,10 @@ function reset_stuff() {




// 🪑 Setup chair
function tp_markers() {
$execute at @e[tag=$(Mapname)] run tp @e[tag=player_spawn,limit=1,sort=random] @e[tag=$(Mapname),limit=1,sort=random];
}


// Simple function to create marker
Expand Down

0 comments on commit 537b124

Please sign in to comment.