Fix optional not using get()
This commit is contained in:
parent
822ad1b7fd
commit
1d9d420c81
@ -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()),
|
||||||
|
Loading…
Reference in New Issue
Block a user