Cleans up top ten list
This commit is contained in:
parent
5adf2a3ef9
commit
4fe46bd1a9
|
@ -24,6 +24,8 @@ public class TopTenData implements DataObject {
|
|||
private Map<UUID, Long> topTen = new LinkedHashMap<>();
|
||||
|
||||
public Map<UUID, Long> getTopTen() {
|
||||
// Remove any entries that have level values less than 1
|
||||
topTen.values().removeIf(l -> l < 1);
|
||||
return topTen.entrySet().stream()
|
||||
.sorted(Collections.reverseOrder(Map.Entry.comparingByValue())).limit(10)
|
||||
.collect(Collectors.toMap(
|
||||
|
|
Loading…
Reference in New Issue