-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Activate or authenticate as an op by doing /trigger OpControl In op-only mode, a new menu option is also available to assign teams for other players (or pre-assign teams for players joining later)
- Loading branch information
1 parent
49326cb
commit 145b3c0
Showing
9 changed files
with
76 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Show team switching menu to @s | ||
|
||
tellraw @s [{"text":"- "},{"text":"[","color":"gold","bold": true},{"text":"Assign player to ", "color":"white","clickEvent":{"action":"suggest_command", "value":"/scoreboard players set PlayerName SetTeam 1"},"extra":[{"selector":"@e[type=area_effect_cloud,scores={md_team=1}]"}]},{"text":"]","color":"gold", "bold": true}] | ||
tellraw @s [{"text":"- "},{"text":"[","color":"gold","bold": true},{"text":"Assign player to ", "color":"white","clickEvent":{"action":"suggest_command", "value":"/scoreboard players set PlayerName SetTeam 2"},"extra":[{"selector":"@e[type=area_effect_cloud,scores={md_team=2}]"}]},{"text":"]","color":"gold", "bold": true}] | ||
tellraw @s [{"text":"- "},{"text":"[","color":"gold","bold": true},{"text":"Assign player to ", "color":"white","clickEvent":{"action":"suggest_command", "value":"/scoreboard players set PlayerName SetTeam 3"},"extra":[{"selector":"@e[type=area_effect_cloud,scores={md_team=3}]"}]},{"text":"]","color":"gold", "bold": true}] | ||
tellraw @s [{"text":"- "},{"text":"[","color":"gold","bold": true},{"text":"Assign player to ", "color":"white","clickEvent":{"action":"suggest_command", "value":"/scoreboard players set PlayerName SetTeam 4"},"extra":[{"selector":"@e[type=area_effect_cloud,scores={md_team=4}]"}]},{"text":"]","color":"gold", "bold": true}] | ||
tellraw @s [{"text":"- "},{"text":"[","color":"gold","bold": true},{"text":"Assign player to ", "color":"white","clickEvent":{"action":"suggest_command", "value":"/scoreboard players set PlayerName SetTeam 5"},"extra":[{"selector":"@e[type=area_effect_cloud,scores={md_team=5}]"}]},{"text":"]","color":"gold", "bold": true}] | ||
tellraw @s [{"text":"- "},{"text":"[","color":"gold","bold": true},{"text":"Assign player to ", "color":"white","clickEvent":{"action":"suggest_command", "value":"/scoreboard players set PlayerName SetTeam 6"},"extra":[{"selector":"@e[type=area_effect_cloud,scores={md_team=6}]"}]},{"text":"]","color":"gold", "bold": true}] | ||
tellraw @s [{"text":"- "},{"text":"[","color":"gold","bold": true},{"text":"Assign player to ", "color":"white","clickEvent":{"action":"suggest_command", "value":"/scoreboard players set PlayerName SetTeam 7"},"extra":[{"selector":"@e[type=area_effect_cloud,scores={md_team=7}]"}]},{"text":"]","color":"gold", "bold": true}] | ||
tellraw @s [{"text":"- "},{"text":"[","color":"gold","bold": true},{"text":"Assign player to ", "color":"white","clickEvent":{"action":"suggest_command", "value":"/scoreboard players set PlayerName SetTeam 8"},"extra":[{"selector":"@e[type=area_effect_cloud,scores={md_team=8}]"}]},{"text":"]","color":"gold", "bold": true}] | ||
tellraw @s [{"text":"- "},{"text":"[","color":"gold","bold": true},{"text":"Assign player to ", "color":"white","clickEvent":{"action":"suggest_command", "value":"/scoreboard players set PlayerName SetTeam 9"},"extra":[{"selector":"@e[type=area_effect_cloud,scores={md_team=9}]"}]},{"text":"]","color":"gold", "bold": true}] | ||
tellraw @s [{"text": "\nSelect an option and replace PlayerName on the command with the player to assign."}] | ||
|
||
scoreboard players set @s md_ticks -1800 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,8 @@ | ||
# Runs for every player on first join_team | ||
|
||
scoreboard players set $Random md_state 0 | ||
execute if score $OpOnly md_state matches 1 run function mob_dash:welcome | ||
|
||
function mob_dash:randomize_bit | ||
function mob_dash:randomize_bit | ||
function mob_dash:randomize_bit | ||
|
||
scoreboard players add $Random md_state 101 | ||
scoreboard players operation @s md_action = $Random md_state | ||
execute unless score @s SetTeam matches 1.. run function mob_dash:randomize_team | ||
function mob_dash:join_team | ||
|
||
tag @s add md_assigned |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Authenticate @s as an op and put the game into op-control mode | ||
|
||
execute if score $OpOnly md_state matches 0 run tellraw @a [{"text": "The game is now in op-only mode.", "color": "gold"}] | ||
|
||
scoreboard players set $OpOnly md_state 1 | ||
tag @s add md_op |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Prompt to authenticate @s as an op and put the game into op-control mode | ||
|
||
execute if score $OpOnly md_state matches 0 run tellraw @s [{"text": "Click here to place the game into op-only mode and authenticate as an operator", "color": "green", "clickEvent": {"action": "run_command", "value": "/function mob_dash:op"}}] | ||
execute if score $OpOnly md_state matches 1 run tellraw @s [{"text": "The game is already in op-only mode. Click here to authenticate as an operator", "color": "green", "clickEvent": {"action": "run_command", "value": "/function mob_dash:op"}}] | ||
|
||
scoreboard players reset @s OpControl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Store a random team id into md_team | ||
|
||
scoreboard players set $Random md_state 0 | ||
|
||
function mob_dash:randomize_bit | ||
function mob_dash:randomize_bit | ||
function mob_dash:randomize_bit | ||
|
||
scoreboard players add $Random md_state 1 | ||
scoreboard players operation @s SetTeam = $Random md_state |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters