Skip to content

Commit

Permalink
Significantly shortened lambda statement
Browse files Browse the repository at this point in the history
  • Loading branch information
bramhaag committed Jan 18, 2017
1 parent cf0f0b9 commit c5eea7a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>me.bramhaag</groupId>
<artifactId>Guilds</artifactId>
<version>1.3.1-RELEASE</version>
<version>1.3.2-RELEASE</version>

<repositories>
<repository>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/me/bramhaag/guilds/commands/CommandInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public void execute(Player player, String[] args) {
Message.sendMessage(player, Message.COMMAND_INFO_HEADER.replace("{guild}", guild.getName()));
Message.sendMessage(player, Message.COMMAND_INFO_NAME.replace("{guild}", guild.getName(), "{prefix}", guild.getPrefix()));
Message.sendMessage(player, Message.COMMAND_INFO_MASTER.replace("{master}", Bukkit.getPlayer(guild.getGuildMaster().getUniqueId()).getName()));
Message.sendMessage(player, Message.COMMAND_INFO_MEMBER_COUNT.replace("{members}", String.valueOf(guild.getMembers().size()), "{members-online}", String.valueOf(guild.getMembers().stream().map((member) -> Bukkit.getPlayer(member.getUniqueId())).collect(Collectors.toList()).stream().filter(OfflinePlayer::isOnline).collect(Collectors.toList()).size())));
Message.sendMessage(player, Message.COMMAND_INFO_MEMBER_COUNT.replace("{members}", String.valueOf(guild.getMembers().size()), "{members-online}", String.valueOf(guild.getMembers().stream().map((member) -> Bukkit.getPlayer(member.getUniqueId())).filter(OfflinePlayer::isOnline).count())));
Message.sendMessage(player, Message.COMMAND_INFO_RANK.replace("{rank}", GuildRole.getRole(guild.getMember(player.getUniqueId()).getRole()).getName()));
}
}

0 comments on commit c5eea7a

Please sign in to comment.