diff --git a/LaunchServer/source/command/handler/JLineCommandHandler.java b/LaunchServer/source/command/handler/JLineCommandHandler.java index f650574..40b1174 100644 --- a/LaunchServer/source/command/handler/JLineCommandHandler.java +++ b/LaunchServer/source/command/handler/JLineCommandHandler.java @@ -72,8 +72,7 @@ if (pos == 0) { list.addAll(commandsMap().keySet()); } else { - Optional command = commandsMap().keySet().stream().filter(c -> c.startsWith(line)).findFirst(); - command.ifPresent(list::add); + commandsMap().keySet().stream().filter(c -> c.startsWith(line)).findFirst().ifPresent(list::add); } return 0; }