Skip to content

Commit

Permalink
Only shows Members or higher in the top members placeholder
Browse files Browse the repository at this point in the history
Fixes #267
  • Loading branch information
tastybento committed Nov 27, 2022
1 parent f3ee8a3 commit 93869cb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/world/bentobox/level/Level.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import world.bentobox.bentobox.api.configuration.Config;
import world.bentobox.bentobox.api.user.User;
import world.bentobox.bentobox.database.objects.Island;
import world.bentobox.bentobox.managers.RanksManager;
import world.bentobox.bentobox.util.Util;
import world.bentobox.level.calculators.Pipeliner;
import world.bentobox.level.commands.AdminLevelCommand;
Expand Down Expand Up @@ -286,6 +287,7 @@ String getRankMembers(World world, int rank) {
if (island != null) {
// Sort members by rank
return island.getMembers().entrySet().stream()
.filter(e -> e.getValue() >= RanksManager.MEMBER_RANK)
.sorted(Collections.reverseOrder(Map.Entry.comparingByValue()))
.map(Map.Entry::getKey)
.map(getPlayers()::getName)
Expand Down

0 comments on commit 93869cb

Please sign in to comment.