From c5eea7af1717ade16c3fae30f3f2897673a56118 Mon Sep 17 00:00:00 2001 From: Bram Hagens Date: Wed, 18 Jan 2017 20:52:19 +0100 Subject: [PATCH] Significantly shortened lambda statement --- pom.xml | 2 +- src/main/java/me/bramhaag/guilds/commands/CommandInfo.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 1842933..d62d20a 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ me.bramhaag Guilds - 1.3.1-RELEASE + 1.3.2-RELEASE diff --git a/src/main/java/me/bramhaag/guilds/commands/CommandInfo.java b/src/main/java/me/bramhaag/guilds/commands/CommandInfo.java index 0e2fa94..9f24390 100644 --- a/src/main/java/me/bramhaag/guilds/commands/CommandInfo.java +++ b/src/main/java/me/bramhaag/guilds/commands/CommandInfo.java @@ -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())); } }