Skip to content

Commit

Permalink
Add TangoCam 'afterPlayerJoin' tag and use it in the kill check (0.14…
Browse files Browse the repository at this point in the history
….26)
  • Loading branch information
Bavadin authored Jan 25, 2025
1 parent 6ed1060 commit 9bc2a65
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ execute if score $dungeon do2.run.active matches 0 run function do2:entity_contr
# Count players on the server.
scoreboard players set $dungeon do2.utility.playerCount 0
execute as @a[tag=!do2.fakePlayer] run scoreboard players add $dungeon do2.utility.playerCount 1
execute if score $dungeon do2.utility.playerCount matches 1.. run tag TangoCam add do2.afterPlayerJoin
execute if score $dungeon do2.utility.playerCount matches 1.. run tag tangocam add do2.afterPlayerJoin

# Enable/Disable certain triggers
execute as @a run function do2:scoreboard/triggers/on_player_join
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ execute as @a[scores={do2.logs.spam=2..}] run tellraw @s ["",{"text":"§f[§9B§
# - End Log -

# Kill TangoCam if no player's are on the server.
execute unless entity @a[tag=!do2.fakePlayer] if entity @a[name=TangoCam] run kill TangoCam
execute unless entity @a[tag=!do2.fakePlayer] if entity @a[name=tangocam] run kill tangocam
execute unless entity @a[tag=!do2.fakePlayer] if entity @a[name=TangoCam,tag=do2.afterPlayerJoin] run kill TangoCam
execute unless entity @a[tag=!do2.fakePlayer] if entity @a[name=tangocam,tag=do2.afterPlayerJoin] run kill tangocam

# Only do dungeon repair IF: an actual player is loading the dungeon.
execute if score $dungeon do2.utility.dungeonRepair matches 1 positioned -548 41.00 1984 if entity @a[tag=!do2.fakePlayer,distance=..300] run function do2:dungeon_setup/all
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ execute if entity @p[name=TangoCam] run clear TangoCam
execute if entity @p[name=TangoCam] run give TangoCam minecraft:filled_map{map: 976,CustomModelData:201}
execute if entity @p[name=TangoCam] run tag TangoCam add do2.spectating
execute if entity @p[name=TangoCam] run tag TangoCam add do2.fakePlayer

execute if entity @p[name=TangoCam] run tag TangoCam remove do2.afterPlayerJoin

# For lowercase tangocam
execute if entity @p[name=tangocam] run clear tangocam
execute if entity @p[name=tangocam] run give tangocam minecraft:filled_map{map: 976,CustomModelData:201}
execute if entity @p[name=tangocam] run tag tangocam add do2.spectating
execute if entity @p[name=tangocam] run tag tangocam add do2.fakePlayer
execute if entity @p[name=tangocam] run tag tangocam add do2.afterPlayerJoin
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ function do2:scoreboard/setup/logs
# - Dungeon Config -
function do2:scoreboard/setup/config

# - systems -
# - Systems -
function do2:scoreboard/setup/systems

# - easter eggs -
# - Easter Eggs -
function do2:scoreboard/setup/easter_eggs

# - cards -
# - Cards -
function do2:scoreboard/setup/cards/cards_available_run
function do2:scoreboard/setup/cards/cards_available_total
function do2:scoreboard/setup/cards/cards_bought_run
Expand All @@ -78,7 +78,7 @@ function do2:scoreboard/setup/cards/cards_played_total
function do2:scoreboard/setup/cards/inside_deck
function do2:scoreboard/setup/cards/cards_price

# - items -
# - Items -
function do2:scoreboard/setup/items

# - Artifacts and Artifakes -
Expand Down
4 changes: 2 additions & 2 deletions Brilliance Datapack/data/do2/functions/version.mcfunction
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# DATAPACK VERSION NUMBER: 0.14.25
# DATAPACK VERSION NUMBER: 0.14.26

tellraw @s ["",{"text":"The §o§n§aBrilliance Datapack§r's version is: [§b0.14.25§r] Check latest version "},{"text":"§o§b§nhere§r","clickEvent":{"action":"open_url","value":"https://github.com/trackedout/Brilliance/blob/main/Brilliance%20Datapack/data/do2/functions/version.mcfunction"}},{"text":"."}]
tellraw @s ["",{"text":"The §o§n§aBrilliance Datapack§r's version is: [§b0.14.26§r] Check latest version "},{"text":"§o§b§nhere§r","clickEvent":{"action":"open_url","value":"https://github.com/trackedout/Brilliance/blob/main/Brilliance%20Datapack/data/do2/functions/version.mcfunction"}},{"text":"."}]

0 comments on commit 9bc2a65

Please sign in to comment.