Fix optional not using get()

This commit is contained in:
libraryaddict 2020-04-22 12:56:50 +12:00
parent 822ad1b7fd
commit 1d9d420c81
No known key found for this signature in database
GPG Key ID: 052E4FBCD257AEA4

View File

@ -42,7 +42,7 @@ public class LDCount implements LDCommand {
if (counts.isEmpty()) { if (counts.isEmpty()) {
sender.sendMessage(LibsMsg.NO_DISGUISES_IN_USE.get()); sender.sendMessage(LibsMsg.NO_DISGUISES_IN_USE.get());
} else { } 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<DisguiseType> types = new ArrayList<>(counts.keySet()); ArrayList<DisguiseType> types = new ArrayList<>(counts.keySet());
types.sort((d1, d2) -> String.CASE_INSENSITIVE_ORDER.compare(TranslateType.DISGUISES.get(d1.toReadable()), types.sort((d1, d2) -> String.CASE_INSENSITIVE_ORDER.compare(TranslateType.DISGUISES.get(d1.toReadable()),