diff --git a/src/de/steamwar/command/TabCompletionCache.java b/src/de/steamwar/command/TabCompletionCache.java index e746155..aa60cc6 100644 --- a/src/de/steamwar/command/TabCompletionCache.java +++ b/src/de/steamwar/command/TabCompletionCache.java @@ -35,7 +35,7 @@ public class TabCompletionCache { TabCompletions tabCompletions = tabCompletionCache.computeIfAbsent(key, ignore -> { return new TabCompletions(command, System.currentTimeMillis(), tabCompleteSupplier.get()); }); - if (tabCompletions.command != command) { + if (tabCompletions.command != command || System.currentTimeMillis() - tabCompletions.timestamp > cacheDuration.get(typeMapper)) { tabCompletions = new TabCompletions(command, System.currentTimeMillis(), tabCompleteSupplier.get()); tabCompletionCache.put(key, tabCompletions); }