|
|
@ -3,6 +3,7 @@ package de.steamwar.fightsystem.utils;
|
|
|
|
import de.steamwar.fightsystem.Config;
|
|
|
|
import de.steamwar.fightsystem.Config;
|
|
|
|
import de.steamwar.fightsystem.FightSystem;
|
|
|
|
import de.steamwar.fightsystem.FightSystem;
|
|
|
|
import de.steamwar.fightsystem.fight.Fight;
|
|
|
|
import de.steamwar.fightsystem.fight.Fight;
|
|
|
|
|
|
|
|
import de.steamwar.fightsystem.fight.FightState;
|
|
|
|
import de.steamwar.fightsystem.fight.FightTeam;
|
|
|
|
import de.steamwar.fightsystem.fight.FightTeam;
|
|
|
|
import de.steamwar.fightsystem.winconditions.WinconditionPercentSystem;
|
|
|
|
import de.steamwar.fightsystem.winconditions.WinconditionPercentSystem;
|
|
|
|
import de.steamwar.fightsystem.winconditions.WinconditionPoints;
|
|
|
|
import de.steamwar.fightsystem.winconditions.WinconditionPoints;
|
|
|
@ -62,7 +63,7 @@ public class FightScoreboard {
|
|
|
|
|
|
|
|
|
|
|
|
private static void generalScoreboard(){
|
|
|
|
private static void generalScoreboard(){
|
|
|
|
objective.setDisplayName("§6Kampf");
|
|
|
|
objective.setDisplayName("§6Kampf");
|
|
|
|
if (Config.Timeout) {
|
|
|
|
if (Config.Timeout || Config.Points) {
|
|
|
|
int fightTime = FightSystem.getFightTime();
|
|
|
|
int fightTime = FightSystem.getFightTime();
|
|
|
|
if (fightTime >= 60)
|
|
|
|
if (fightTime >= 60)
|
|
|
|
objective.getScore("§7Zeit: §a" + fightTime / 60 + "m " + fightTime % 60 + "s").setScore(3);
|
|
|
|
objective.getScore("§7Zeit: §a" + fightTime / 60 + "m " + fightTime % 60 + "s").setScore(3);
|
|
|
@ -71,18 +72,21 @@ public class FightScoreboard {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (Config.Entern)
|
|
|
|
if (Config.Entern)
|
|
|
|
objective.getScore("§7Entern: " + (FightSystem.isEntern() ? "§aja" : "§cnein")).setScore(2);
|
|
|
|
objective.getScore("§7Entern: " + (FightSystem.isEntern() ? "§aja" : "§cnein")).setScore(2);
|
|
|
|
if (Config.PercentSystem){
|
|
|
|
|
|
|
|
objective.getScore(Fight.getRedTeam().getPrefix() + "Schaden: " + (Math.round(100.0 * WinconditionPercentSystem.getRedPercent()) / 100.0) + "%").setScore(1);
|
|
|
|
if(FightSystem.getFightState() == FightState.RUNNING){
|
|
|
|
objective.getScore(Fight.getBlueTeam().getPrefix() + "Schaden: " + (Math.round(100.0 * WinconditionPercentSystem.getBluePercent()) / 100.0) + "%").setScore(0);
|
|
|
|
if (Config.PercentSystem){
|
|
|
|
}else if(Config.WaterTechKO){
|
|
|
|
objective.getScore(Fight.getRedTeam().getPrefix() + "Schaden: " + (Math.round(100.0 * WinconditionPercentSystem.getRedPercent()) / 100.0) + "%").setScore(1);
|
|
|
|
objective.getScore(Fight.getRedTeam().getPrefix() + "Wasser: " + WinconditionWaterTechKO.getTeamRedWater()).setScore(1);
|
|
|
|
objective.getScore(Fight.getBlueTeam().getPrefix() + "Schaden: " + (Math.round(100.0 * WinconditionPercentSystem.getBluePercent()) / 100.0) + "%").setScore(0);
|
|
|
|
objective.getScore(Fight.getBlueTeam().getPrefix() + "Wasser: " + WinconditionWaterTechKO.getTeamBlueWater()).setScore(0);
|
|
|
|
}else if(Config.WaterTechKO){
|
|
|
|
}else if(Config.RelativePercent){
|
|
|
|
objective.getScore(Fight.getRedTeam().getPrefix() + "Wasser: " + WinconditionWaterTechKO.getTeamRedWater()).setScore(1);
|
|
|
|
objective.getScore(Fight.getRedTeam().getPrefix() + "Schaden: " + WinconditionRelativePercent.getRed().getPrintablePercent() + "%").setScore(1);
|
|
|
|
objective.getScore(Fight.getBlueTeam().getPrefix() + "Wasser: " + WinconditionWaterTechKO.getTeamBlueWater()).setScore(0);
|
|
|
|
objective.getScore(Fight.getBlueTeam().getPrefix() + "Schaden: " + WinconditionRelativePercent.getBlue().getPrintablePercent() + "%").setScore(0);
|
|
|
|
}else if(Config.RelativePercent){
|
|
|
|
}else if(Config.Points){
|
|
|
|
objective.getScore(Fight.getRedTeam().getPrefix() + "Schaden: " + WinconditionRelativePercent.getRed().getPrintablePercent() + "%").setScore(1);
|
|
|
|
objective.getScore(Fight.getRedTeam().getPrefix() + "Punkte: " + WinconditionPoints.getRed().getPoints()).setScore(1);
|
|
|
|
objective.getScore(Fight.getBlueTeam().getPrefix() + "Schaden: " + WinconditionRelativePercent.getBlue().getPrintablePercent() + "%").setScore(0);
|
|
|
|
objective.getScore(Fight.getBlueTeam().getPrefix() + "Punkte: " + WinconditionPoints.getBlue().getPoints()).setScore(0);
|
|
|
|
}else if(Config.Points){
|
|
|
|
|
|
|
|
objective.getScore(Fight.getRedTeam().getPrefix() + "Punkte: " + WinconditionPoints.getRed().getPoints()).setScore(1);
|
|
|
|
|
|
|
|
objective.getScore(Fight.getBlueTeam().getPrefix() + "Punkte: " + WinconditionPoints.getBlue().getPoints()).setScore(0);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|