Update BanManager.java

This commit is contained in:
Paldiu 2021-04-04 22:42:59 -05:00
parent 96b25fe139
commit 5abf62aa68

View File

@ -36,11 +36,12 @@ public class BanManager extends SimplexListener {
}
AtomicReference<Ban> temp = new AtomicReference<>();
banMap.forEach((ban, type) -> {
if (ban.getOffender().equals(player.getUniqueId())) {
temp.set(ban);
}
});
banMap.keySet()
.stream()
.filter(ban -> ban.getOffender().equals(player.getUniqueId()))
.forEach(temp::set);
return temp.get();
}