Skip to content

Commit 97ac2b0

Browse files
committed
Fix death messages not showing points lost.
After the last update death messages stopped showing how many points a player lost in a match.
1 parent 5f72b74 commit 97ac2b0

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# @s = Players that have been kicked from their arena for various reasons
2+
# at most negative corner of some arena's walls on arena floor. DO NOT RELY ON THIS LOCATION
3+
# called by stack_attack_arena:players/leave_arena or /quit_game or /death
4+
5+
# tellraw
6+
tellraw @s ["",{"text":"["},{"text":"S","color":"yellow"},{"text":"tack ","color":"light_purple"},{"text":"A","color":"blue"},{"text":"ttack","color":"green"},{"text":"] ","color":"none"},{"text":"You lost a point on the leaderboard!","color":"red"}]

data/stack_attack_arena/functions/players/announcements/death/lost_points.mcfunction

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
# called by stack_attack_arena:players/leave_arena or /quit_game or /death
44

55
# tellraw
6-
tellraw @s ["",{"text":"["},{"text":"S","color":"yellow"},{"text":"tack ","color":"light_purple"},{"text":"A","color":"blue"},{"text":"ttack","color":"green"},{"text":"] ","color":"none"},{"text":"You lost a point on the leaderboard!","color":"red"}]
6+
tellraw @s ["",{"text":"["},{"text":"S","color":"yellow"},{"text":"tack ","color":"light_purple"},{"text":"A","color":"blue"},{"text":"ttack","color":"green"},{"text":"] ","color":"none"},{"text":"You lost ","color":"red"},{"score":{"name":"@s","objective":"sat_match_value"},"color":"red"},{"text":" points on the leaderboard!","color":"red"}]

data/stack_attack_arena/functions/players/death.mcfunction

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
# called by stack_attack_arena:players/leave_arena
44

55
# announce to self
6-
execute if entity @s[tag=sat_payed_fee] run function stack_attack_arena:players/announcements/death/lost_points
7-
execute unless entity @s[tag=sat_payed_fee] run tellraw @s ["",{"text":"["},{"text":"S","color":"yellow"},{"text":"tack ","color":"light_purple"},{"text":"A","color":"blue"},{"text":"ttack","color":"green"},{"text":"] ","color":"none"},{"text":"You died!","color":"red"}]
6+
execute if score @s sat_match_value matches 1.. run function stack_attack_arena:players/announcements/death/lost_points
7+
execute if score @s sat_match_value matches 1 run function stack_attack_arena:players/announcements/death/lost_point
8+
execute unless score @s sat_match_value matches 1.. run tellraw @s ["",{"text":"["},{"text":"S","color":"yellow"},{"text":"tack ","color":"light_purple"},{"text":"A","color":"blue"},{"text":"ttack","color":"green"},{"text":"] ","color":"none"},{"text":"You died!","color":"red"}]
89

910
# set the gamemode depending on the default_gamemode sat_data score.
1011
execute if score default_gamemode sat_data matches 0 run gamemode survival

0 commit comments

Comments
 (0)