Skip to content

Commit

Permalink
Update to BentoBox 2.0.0 API
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Nov 18, 2023
1 parent 1a4077b commit 77884f0
Show file tree
Hide file tree
Showing 3 changed files with 924 additions and 1,035 deletions.
2 changes: 1 addition & 1 deletion src/main/java/world/bentobox/level/LevelsManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ public Map<World, TopTenData> getTopTenLists() {
public int getRank(@NonNull World world, UUID uuid) {
createAndCleanRankings(world);
Stream<Entry<UUID, Long>> stream = topTenLists.get(world).getTopTen().entrySet().stream()
.filter(e -> addon.getIslands().isOwner(world, e.getKey())).filter(l -> l.getValue() > 0)
.filter(e -> addon.getIslands().hasIsland(world, e.getKey())).filter(l -> l.getValue() > 0)
.sorted(Collections.reverseOrder(Map.Entry.comparingByValue()));
return (int) (stream.takeWhile(x -> !x.getKey().equals(uuid)).map(Map.Entry::getKey).count() + 1);
}
Expand Down
Loading

0 comments on commit 77884f0

Please sign in to comment.