From 6bd95ad84c44440f01515e56cacbf44b8ff0aa4a Mon Sep 17 00:00:00 2001 From: yoyosource Date: Mon, 20 Jun 2022 13:26:33 +0200 Subject: [PATCH] Fix one thing --- src/de/steamwar/command/TabCompletionCache.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }