Hotfix NPE
Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Ursprung
5a9e281c95
Commit
542547fd5b
@ -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(){
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren