Fix multiple times techko
Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Ursprung
2cb8c5e8b3
Commit
b13362176c
@ -36,7 +36,7 @@ public class WinconditionTechKO extends ListenerWincondition {
|
|||||||
* Works only for z-Axis fight direction for performance reasons
|
* Works only for z-Axis fight direction for performance reasons
|
||||||
*/
|
*/
|
||||||
public WinconditionTechKO(){
|
public WinconditionTechKO(){
|
||||||
super(Config.TechKO, EnumSet.of(FightState.RUNNING, FightState.SPECTATE));
|
super(Config.TechKO, EnumSet.of(FightState.RUNNING));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -44,7 +44,7 @@ public class WinconditionWaterTechKO extends Wincondition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void checkEmpty(FightTeam team, int teamWater){
|
private void checkEmpty(FightTeam team, int teamWater){
|
||||||
if(teamWater == 0){
|
if(teamWater == 0 && FightSystem.getFightState() != FightState.SPECTATE){
|
||||||
Bukkit.broadcastMessage(FightSystem.PREFIX + "§eDas Team " + team.getColoredName() + " §eist Tech K.O.!");
|
Bukkit.broadcastMessage(FightSystem.PREFIX + "§eDas Team " + team.getColoredName() + " §eist Tech K.O.!");
|
||||||
Bukkit.getScheduler().runTask(FightSystem.getPlugin(), () -> FightSystem.setSpectateState(Fight.getOpposite(team), "WaterTechKO"));
|
Bukkit.getScheduler().runTask(FightSystem.getPlugin(), () -> FightSystem.setSpectateState(Fight.getOpposite(team), "WaterTechKO"));
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren