From 839d738949c7dd64f3b5059f1588f60e76689192 Mon Sep 17 00:00:00 2001 From: Chaos Date: Thu, 24 Feb 2022 22:26:49 +0100 Subject: [PATCH] fix(schemnode_cache): Fix Tabcomplete Cache Signed-off-by: Chaos --- SpigotCore_Main/src/de/steamwar/sql/SchematicNode.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SpigotCore_Main/src/de/steamwar/sql/SchematicNode.java b/SpigotCore_Main/src/de/steamwar/sql/SchematicNode.java index 9a90105..e6fa356 100644 --- a/SpigotCore_Main/src/de/steamwar/sql/SchematicNode.java +++ b/SpigotCore_Main/src/de/steamwar/sql/SchematicNode.java @@ -467,7 +467,7 @@ public class SchematicNode { nodes.forEach(node -> list.add((sws ? "/" : "") + node.getName() + (node.isDir() ? "/" : ""))); } list.remove("//copy"); - Objects.requireNonNull(TAB_CACHE.putIfAbsent(user.getId(), new HashMap<>())).putIfAbsent(cacheKey, list); + TAB_CACHE.computeIfAbsent(user.getId(), integer -> new HashMap<>()).putIfAbsent(cacheKey, list); return list; }