Skip to content

Commit

Permalink
Players are now invisible during countdown
Browse files Browse the repository at this point in the history
Fixes #13
  • Loading branch information
ellieisjelly committed Oct 19, 2024
1 parent c934ac4 commit cc4c4d1
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ private ActionResult onDeath(ServerPlayerEntity plr, DamageSource damageSource)
plrs.remove(attacker);
}

plrs.sendMessage(Text.translatable("sabotage.kill_message", plr.getName(), plrs.size()).formatted(Formatting.YELLOW));
plrs.sendMessage(Text.translatable("sabotage.kill_message", plr.getName(), getAlivePlayers().size()).formatted(Formatting.YELLOW));
}
return ActionResult.FAIL;
}
Expand Down Expand Up @@ -640,6 +640,9 @@ public void onTick() {
plrs.playSound(SoundEvents.BLOCK_RESPAWN_ANCHOR_CHARGE);
plrs.sendMessage(Text.translatable("sabotage.game_start", config.gracePeriod()).formatted(Formatting.YELLOW));
} else {
for (ServerPlayerEntity plr : plrs) {
plr.setStatusEffect(new StatusEffectInstance(StatusEffects.INVISIBILITY, 40, 0, false, false), plr);
}
plrs.showTitle(Text.literal(Integer.toString(countdownTime - secondsSinceStart)).formatted(Formatting.GOLD), 20);
plrs.playSound(SoundEvents.BLOCK_NOTE_BLOCK_HARP.value(), SoundCategory.PLAYERS, 1.0F, 2.0F);
}
Expand Down

0 comments on commit cc4c4d1

Please sign in to comment.