mirror of
https://github.com/BentoBoxWorld/Level.git
synced 2025-02-13 10:11:29 +01:00
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
Block a user