Send message on death

This commit is contained in:
Mathieu Strypsteen 2024-09-23 09:31:05 +02:00
parent 231c1e4935
commit e4f76dae55

View file

@ -16,6 +16,8 @@ import com.destroystokyo.paper.event.player.PlayerPostRespawnEvent;
import gent.zeus.mc13dtl.MC13DTL;
import gent.zeus.mc13dtl.events.Difficulty;
import gent.zeus.mc13dtl.events.Event;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.format.NamedTextColor;
public class EndEvent extends Event {
private PotionEffectType[] effects;
@ -76,7 +78,10 @@ public class EndEvent extends Event {
if (!MC13DTL.board.getPlayers(team).contains(event.getPlayer())) {
return;
}
livesLeft--;
if (livesLeft > 0) {
livesLeft--;
MC13DTL.board.sendMessageToTeam(team, Component.text("You have " + livesLeft + "lives left").color(NamedTextColor.RED));
}
}
@Override