From 1215ea46bab54aa4c6d6affcbed7eeacfb8a8576 Mon Sep 17 00:00:00 2001 From: William Date: Sun, 27 Oct 2024 00:14:20 +0100 Subject: [PATCH] fix: add `getPlayerCustomDataStore` impl on Fabric (cherry picked from commit c00265f1f9a8f7b432d335f3d4257ad9682dde42) --- .../java/net/william278/husksync/FabricHuskSync.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/fabric/src/main/java/net/william278/husksync/FabricHuskSync.java b/fabric/src/main/java/net/william278/husksync/FabricHuskSync.java index 0f4b2688..c59a0739 100644 --- a/fabric/src/main/java/net/william278/husksync/FabricHuskSync.java +++ b/fabric/src/main/java/net/william278/husksync/FabricHuskSync.java @@ -274,6 +274,15 @@ public Uniform getUniform() { return FabricUniform.getInstance(mod.getMetadata().getId()); } + @NotNull + @Override + public Map getPlayerCustomDataStore(@NotNull OnlineUser user) { + return playerCustomDataStore.compute( + user.getUuid(), + (uuid, data) -> data == null ? Maps.newHashMap() : data + ); + } + @Override @Nullable public InputStream getResource(@NotNull String name) {