mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-01-26 18:11:43 +01:00
parent
acb984ee90
commit
1c4fb76828
@ -91,12 +91,11 @@ public class IslandTeamCommand extends CompositeCommand {
|
|||||||
|
|
||||||
private void showMembers(Island island, User user) {
|
private void showMembers(Island island, User user) {
|
||||||
// Gather online members
|
// Gather online members
|
||||||
List<UUID> onlineMembers = island
|
long count = island
|
||||||
.getMemberSet(RanksManager.MEMBER_RANK)
|
.getMemberSet(RanksManager.MEMBER_RANK)
|
||||||
.stream()
|
.stream()
|
||||||
.filter(uuid -> Bukkit.getOfflinePlayer(uuid)
|
.filter(uuid -> Util.getOnlinePlayerList(user).contains(Bukkit.getOfflinePlayer(uuid).getName()))
|
||||||
.isOnline())
|
.count();
|
||||||
.collect(Collectors.toList());
|
|
||||||
|
|
||||||
// List of ranks that we will loop through
|
// List of ranks that we will loop through
|
||||||
Integer[] ranks = new Integer[]{RanksManager.OWNER_RANK, RanksManager.SUB_OWNER_RANK, RanksManager.MEMBER_RANK, RanksManager.TRUSTED_RANK, RanksManager.COOP_RANK};
|
Integer[] ranks = new Integer[]{RanksManager.OWNER_RANK, RanksManager.SUB_OWNER_RANK, RanksManager.MEMBER_RANK, RanksManager.TRUSTED_RANK, RanksManager.COOP_RANK};
|
||||||
@ -105,10 +104,10 @@ public class IslandTeamCommand extends CompositeCommand {
|
|||||||
user.sendMessage("commands.island.team.info.header",
|
user.sendMessage("commands.island.team.info.header",
|
||||||
"[max]", String.valueOf(getIslands().getMaxMembers(island, RanksManager.MEMBER_RANK)),
|
"[max]", String.valueOf(getIslands().getMaxMembers(island, RanksManager.MEMBER_RANK)),
|
||||||
"[total]", String.valueOf(island.getMemberSet().size()),
|
"[total]", String.valueOf(island.getMemberSet().size()),
|
||||||
"[online]", String.valueOf(onlineMembers.size()));
|
"[online]", String.valueOf(count));
|
||||||
|
|
||||||
// We now need to get all online "members" of the island - incl. Trusted and coop
|
// We now need to get all online "members" of the island - incl. Trusted and coop
|
||||||
onlineMembers = island.getMemberSet(RanksManager.COOP_RANK).stream()
|
List<UUID> onlineMembers = island.getMemberSet(RanksManager.COOP_RANK).stream()
|
||||||
.filter(uuid -> Util.getOnlinePlayerList(user).contains(Bukkit.getOfflinePlayer(uuid).getName())).collect(Collectors.toList());
|
.filter(uuid -> Util.getOnlinePlayerList(user).contains(Bukkit.getOfflinePlayer(uuid).getName())).collect(Collectors.toList());
|
||||||
|
|
||||||
for (int rank : ranks) {
|
for (int rank : ranks) {
|
||||||
|
Loading…
Reference in New Issue
Block a user