bugfixes
Signed-off-by: Yaruma3341 <yaruma3341@gmail.com>
Dieser Commit ist enthalten in:
Ursprung
a2f8b8e917
Commit
5d5884ca1b
@ -2,6 +2,7 @@ package me.yaruma.fightsystem.listener;
|
||||
|
||||
import me.yaruma.fightsystem.FightSystem;
|
||||
import me.yaruma.fightsystem.fight.Fight;
|
||||
import me.yaruma.fightsystem.fight.FightPlayer;
|
||||
import me.yaruma.fightsystem.fight.FightState;
|
||||
import me.yaruma.fightsystem.fight.FightTeam;
|
||||
import org.bukkit.Bukkit;
|
||||
@ -26,8 +27,11 @@ public class PlayerQuitListener implements Listener {
|
||||
if(fightState == FightState.SETUP){
|
||||
fightTeam.removePlayer(player);
|
||||
}else if(fightState == FightState.PRE_RUNNING || fightState == FightState.RUNNING){
|
||||
FightPlayer fightPlayer = fightTeam.getFightPlayer(player);
|
||||
if(!fightPlayer.isOut()) {
|
||||
fightTeam.getFightPlayer(player).setOut(true);
|
||||
Bukkit.broadcastMessage(FightSystem.PREFIX + "§cDer Spieler §6" + player.getName() + " §chat den Kampf verlassen!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -39,6 +39,7 @@ public class Scoreboard {
|
||||
objective.setDisplayName(fightTeam.getName());
|
||||
|
||||
for (FightPlayer fp : fightTeam.getPlayers()) {
|
||||
if(!fp.isOut())
|
||||
objective.getScore(fightTeam.getPrefix() + fp.getPlayer().getName()).setScore((int) fp.getPlayer().getHealth());
|
||||
}
|
||||
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren