SteamWar/FightSystem
Archiviert
13
1
Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2020-01-20 18:46:52 +01:00
Ursprung 5a9e281c95
Commit 542547fd5b

Datei anzeigen

@ -97,7 +97,7 @@ public class WinconditionPoints extends PlayerWincondition {
public static class TeamPoints {
private final FightTeam enemy;
private final WinconditionRelativePercent.TeamPercent enemyPercent;
private final double factor;
private double factor;
private static final int maxPoints = 2000;
private int points;
@ -107,6 +107,8 @@ public class WinconditionPoints extends PlayerWincondition {
this.enemyPercent = enemyPercent;
points = 0;
//Prevent NPE
Bukkit.getScheduler().runTask(FightSystem.getPlugin(), () ->{
if(enemyPercent.getBlockCount() < ownPercent.getBlockCount())
this.factor = 10000; //Original mit 20 (20% = 0.2 ergeben 2000 Punkte
else{
@ -119,6 +121,7 @@ public class WinconditionPoints extends PlayerWincondition {
this.factor = f;
}
});
}
public int getPoints(){