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.FightSystem;
|
||||||
import me.yaruma.fightsystem.fight.Fight;
|
import me.yaruma.fightsystem.fight.Fight;
|
||||||
|
import me.yaruma.fightsystem.fight.FightPlayer;
|
||||||
import me.yaruma.fightsystem.fight.FightState;
|
import me.yaruma.fightsystem.fight.FightState;
|
||||||
import me.yaruma.fightsystem.fight.FightTeam;
|
import me.yaruma.fightsystem.fight.FightTeam;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
@ -26,8 +27,11 @@ public class PlayerQuitListener implements Listener {
|
|||||||
if(fightState == FightState.SETUP){
|
if(fightState == FightState.SETUP){
|
||||||
fightTeam.removePlayer(player);
|
fightTeam.removePlayer(player);
|
||||||
}else if(fightState == FightState.PRE_RUNNING || fightState == FightState.RUNNING){
|
}else if(fightState == FightState.PRE_RUNNING || fightState == FightState.RUNNING){
|
||||||
fightTeam.getFightPlayer(player).setOut(true);
|
FightPlayer fightPlayer = fightTeam.getFightPlayer(player);
|
||||||
Bukkit.broadcastMessage(FightSystem.PREFIX + "§cDer Spieler §6" + player.getName() + " §chat den Kampf verlassen!");
|
if(!fightPlayer.isOut()) {
|
||||||
|
fightTeam.getFightPlayer(player).setOut(true);
|
||||||
|
Bukkit.broadcastMessage(FightSystem.PREFIX + "§cDer Spieler §6" + player.getName() + " §chat den Kampf verlassen!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -39,7 +39,8 @@ public class Scoreboard {
|
|||||||
objective.setDisplayName(fightTeam.getName());
|
objective.setDisplayName(fightTeam.getName());
|
||||||
|
|
||||||
for (FightPlayer fp : fightTeam.getPlayers()) {
|
for (FightPlayer fp : fightTeam.getPlayers()) {
|
||||||
objective.getScore(fightTeam.getPrefix() + fp.getPlayer().getName()).setScore((int) fp.getPlayer().getHealth());
|
if(!fp.isOut())
|
||||||
|
objective.getScore(fightTeam.getPrefix() + fp.getPlayer().getName()).setScore((int) fp.getPlayer().getHealth());
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren