From 3d7e619bf675a5e35dc12635aa4b39c50d7ea06c Mon Sep 17 00:00:00 2001 From: yoyosource Date: Thu, 16 Jun 2022 20:51:51 +0200 Subject: [PATCH] Fix duplicates in tab complete --- src/de/steamwar/command/AbstractSWCommand.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/de/steamwar/command/AbstractSWCommand.java b/src/de/steamwar/command/AbstractSWCommand.java index 16b764c..d9a721f 100644 --- a/src/de/steamwar/command/AbstractSWCommand.java +++ b/src/de/steamwar/command/AbstractSWCommand.java @@ -93,6 +93,7 @@ public abstract class AbstractSWCommand { .flatMap(Collection::stream) .filter(s -> !s.isEmpty()) .filter(s -> s.toLowerCase().startsWith(string)) + .distinct() .collect(Collectors.toList()); }