Skip to content

Commit

Permalink
Cleans up top ten list
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Jul 10, 2019
1 parent 5adf2a3 commit 4fe46bd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/world/bentobox/level/objects/TopTenData.java
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 4fe46bd

Please sign in to comment.