Dieser Commit ist enthalten in:
Ursprung
f4ffd17c55
Commit
14e64c3947
@ -45,7 +45,6 @@ public abstract class Countdown {
|
||||
private final boolean level;
|
||||
|
||||
protected int time;
|
||||
protected int timeElapsed;
|
||||
private BukkitTask task = null;
|
||||
|
||||
public abstract void countdownFinished();
|
||||
@ -111,13 +110,8 @@ public abstract class Countdown {
|
||||
return time;
|
||||
}
|
||||
|
||||
public int getTimeElapsed(){
|
||||
return timeElapsed;
|
||||
}
|
||||
|
||||
private void count() {
|
||||
time--;
|
||||
timeElapsed++;
|
||||
show();
|
||||
}
|
||||
|
||||
|
@ -119,11 +119,9 @@ public class FightStatistics {
|
||||
}
|
||||
|
||||
int remainingTime = 0;
|
||||
int timeElapsed = 0;
|
||||
Countdown timeOverCountdown = Wincondition.getTimeOverCountdown();
|
||||
if (timeOverCountdown != null) {
|
||||
remainingTime = timeOverCountdown.getTimeLeft();
|
||||
timeElapsed = timeOverCountdown.getTimeElapsed();
|
||||
}
|
||||
|
||||
try {
|
||||
@ -149,18 +147,14 @@ public class FightStatistics {
|
||||
}
|
||||
replayLock = false;
|
||||
|
||||
calculateEloIfNeeded(timeElapsed, blueSchemRank, redSchemRank, blueResult, gameMode);
|
||||
calculateEloIfNeeded(blueSchemRank, redSchemRank, blueResult, gameMode);
|
||||
}
|
||||
|
||||
private void calculateEloIfNeeded(int timeElapsed, Integer blueSchemRank, Integer redSchemRank, double blueResult, String gameMode) {
|
||||
private void calculateEloIfNeeded(Integer blueSchemRank, Integer redSchemRank, double blueResult, String gameMode) {
|
||||
if (!Config.RankedEnabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (timeElapsed < 30) { // Too short fights are not worth elo change
|
||||
return;
|
||||
}
|
||||
|
||||
if (blueSchemRank == null || redSchemRank == null) { // Schematics are not ranked
|
||||
return;
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren