Edit MVP calculations
This commit is contained in:
parent
cfdd1ed8eb
commit
bcd1993dbe
|
@ -40,6 +40,7 @@ public class HighlightListener implements Listener {
|
|||
double points = 0;
|
||||
points += facet.matchKills();
|
||||
points -= facet.deaths();
|
||||
points -= facet.teammatesKilled();
|
||||
for (long wool : facet.getWoolCaptureTimes()) {
|
||||
int woolPoints = (int)((wool * 2.25) - 2);
|
||||
points += Math.min(Math.max(woolPoints, 0), 120);
|
||||
|
@ -60,7 +61,7 @@ public class HighlightListener implements Listener {
|
|||
points += Math.min(Math.max(flagPoints, 0), 120);
|
||||
}
|
||||
|
||||
points += (facet.getBlocksBroken() / 20);
|
||||
points += (facet.getBlocksBroken() / 30);
|
||||
|
||||
if (bestPlayerStats == null || points > bestPlayerPoints) {
|
||||
bestPlayerStats = facet;
|
||||
|
|
|
@ -28,7 +28,7 @@ import java.util.*;
|
|||
public class StatsUserFacet implements MatchUserFacet, Listener {
|
||||
|
||||
private final UUID player;
|
||||
private int lifeKills, teamKills, matchKills, deaths;
|
||||
private int lifeKills, teamKills, matchKills, teammatesKilled, deaths;
|
||||
private List<Long> woolCaptureTimes;
|
||||
private Map<Core, Long> coreTouchTimes;
|
||||
private List<Long> coreLeakTimes;
|
||||
|
@ -69,6 +69,13 @@ public class StatsUserFacet implements MatchUserFacet, Listener {
|
|||
return matchKills;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the amount of kills this player got in the whole match.
|
||||
*/
|
||||
public int teammatesKilled() {
|
||||
return teammatesKilled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Amount of times this player died.
|
||||
*/
|
||||
|
@ -111,6 +118,8 @@ public class StatsUserFacet implements MatchUserFacet, Listener {
|
|||
++lifeKills;
|
||||
++teamKills;
|
||||
++matchKills;
|
||||
} else if (killer != null && killer.getUniqueId().equals(player) && event.isTeamKill()) {
|
||||
++teammatesKilled;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue