Skip to content

Commit

Permalink
šŸ› fix players in creative/spectator at low health triggering custom dā€¦
Browse files Browse the repository at this point in the history
ā€¦eath message
  • Loading branch information
TheAfroOfDoom committed Oct 24, 2024
1 parent 8d1382d commit 62a6a35
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# If player is going to die to this hit, disable `showDeathMessages` temporarily and display a custom death message
scoreboard players set #omegaflowey.bossfight.player_died omegaflowey.global.flag 0
$execute \
if entity @s[gamemode=!creative, gamemode=!spectator] \
if score @s omegaflowey.player.health matches ..$(damage) \
unless data entity @s active_effects[{ amplifier: 4b, duration: -1, id: "minecraft:resistance" }] \
run scoreboard players set #omegaflowey.bossfight.player_died omegaflowey.global.flag 1
Expand Down

0 comments on commit 62a6a35

Please sign in to comment.