mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-24 09:01:41 +01:00
Fixed /player kill table only showing self kills
This commit is contained in:
parent
5ebe33e293
commit
d2b57498da
@ -117,4 +117,8 @@ public class PlayerKill implements DateHolder {
|
|||||||
public boolean isSelfKill() {
|
public boolean isSelfKill() {
|
||||||
return getVictimName().map(v -> v.equals(killerName)).orElse(false);
|
return getVictimName().map(v -> v.equals(killerName)).orElse(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isNotSelfKill() {
|
||||||
|
return !isSelfKill();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ public class PlayerKillMutator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public PlayerKillMutator filterNonSelfKills() {
|
public PlayerKillMutator filterNonSelfKills() {
|
||||||
return new PlayerKillMutator(kills.stream().filter(PlayerKill::isSelfKill).collect(Collectors.toList()));
|
return new PlayerKillMutator(kills.stream().filter(PlayerKill::isNotSelfKill).collect(Collectors.toList()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Map<String, Object>> toJSONAsMap(Formatters formatters) {
|
public List<Map<String, Object>> toJSONAsMap(Formatters formatters) {
|
||||||
|
Loading…
Reference in New Issue
Block a user