From 1d9d420c81867a35c2ed32667877a435bf65e3e2 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Wed, 22 Apr 2020 12:56:50 +1200 Subject: [PATCH] Fix optional not using get() --- .../libraryaddict/disguise/commands/libsdisguises/LDCount.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/me/libraryaddict/disguise/commands/libsdisguises/LDCount.java b/src/main/java/me/libraryaddict/disguise/commands/libsdisguises/LDCount.java index 82257b78..256e2a16 100644 --- a/src/main/java/me/libraryaddict/disguise/commands/libsdisguises/LDCount.java +++ b/src/main/java/me/libraryaddict/disguise/commands/libsdisguises/LDCount.java @@ -42,7 +42,7 @@ public class LDCount implements LDCommand { if (counts.isEmpty()) { sender.sendMessage(LibsMsg.NO_DISGUISES_IN_USE.get()); } else { - sender.sendMessage(LibsMsg.ACTIVE_DISGUISES_COUNT.get(counts.values().stream().reduce(Integer::sum))); + sender.sendMessage(LibsMsg.ACTIVE_DISGUISES_COUNT.get(counts.values().stream().reduce(Integer::sum).get())); ArrayList types = new ArrayList<>(counts.keySet()); types.sort((d1, d2) -> String.CASE_INSENSITIVE_ORDER.compare(TranslateType.DISGUISES.get(d1.toReadable()),