Send message on death
This commit is contained in:
parent
231c1e4935
commit
e4f76dae55
1 changed files with 6 additions and 1 deletions
|
@ -16,6 +16,8 @@ import com.destroystokyo.paper.event.player.PlayerPostRespawnEvent;
|
||||||
import gent.zeus.mc13dtl.MC13DTL;
|
import gent.zeus.mc13dtl.MC13DTL;
|
||||||
import gent.zeus.mc13dtl.events.Difficulty;
|
import gent.zeus.mc13dtl.events.Difficulty;
|
||||||
import gent.zeus.mc13dtl.events.Event;
|
import gent.zeus.mc13dtl.events.Event;
|
||||||
|
import net.kyori.adventure.text.Component;
|
||||||
|
import net.kyori.adventure.text.format.NamedTextColor;
|
||||||
|
|
||||||
public class EndEvent extends Event {
|
public class EndEvent extends Event {
|
||||||
private PotionEffectType[] effects;
|
private PotionEffectType[] effects;
|
||||||
|
@ -76,7 +78,10 @@ public class EndEvent extends Event {
|
||||||
if (!MC13DTL.board.getPlayers(team).contains(event.getPlayer())) {
|
if (!MC13DTL.board.getPlayers(team).contains(event.getPlayer())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (livesLeft > 0) {
|
||||||
livesLeft--;
|
livesLeft--;
|
||||||
|
MC13DTL.board.sendMessageToTeam(team, Component.text("You have " + livesLeft + "lives left").color(NamedTextColor.RED));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue