From d2b57498dae71c0f1853b50df86328f5c5f382c7 Mon Sep 17 00:00:00 2001 From: Rsl1122 Date: Mon, 26 Aug 2019 10:56:45 +0300 Subject: [PATCH] Fixed /player kill table only showing self kills --- .../java/com/djrapitops/plan/data/container/PlayerKill.java | 4 ++++ .../plan/data/store/mutators/PlayerKillMutator.java | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Plan/common/src/main/java/com/djrapitops/plan/data/container/PlayerKill.java b/Plan/common/src/main/java/com/djrapitops/plan/data/container/PlayerKill.java index 7aab04622..abac48863 100644 --- a/Plan/common/src/main/java/com/djrapitops/plan/data/container/PlayerKill.java +++ b/Plan/common/src/main/java/com/djrapitops/plan/data/container/PlayerKill.java @@ -117,4 +117,8 @@ public class PlayerKill implements DateHolder { public boolean isSelfKill() { return getVictimName().map(v -> v.equals(killerName)).orElse(false); } + + public boolean isNotSelfKill() { + return !isSelfKill(); + } } diff --git a/Plan/common/src/main/java/com/djrapitops/plan/data/store/mutators/PlayerKillMutator.java b/Plan/common/src/main/java/com/djrapitops/plan/data/store/mutators/PlayerKillMutator.java index df691dcb7..48cd1f13c 100644 --- a/Plan/common/src/main/java/com/djrapitops/plan/data/store/mutators/PlayerKillMutator.java +++ b/Plan/common/src/main/java/com/djrapitops/plan/data/store/mutators/PlayerKillMutator.java @@ -38,7 +38,7 @@ public class PlayerKillMutator { } 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> toJSONAsMap(Formatters formatters) {