From be0c6be2aa56cc2016cba908862eaebae4b03d61 Mon Sep 17 00:00:00 2001 From: Efe Kurban Date: Mon, 17 Jun 2024 23:31:28 +0300 Subject: [PATCH] Added null-check for server keys (#106) Fixes https://github.com/ProxioDev/ValioBungee/issues/105 --- .../redisbungee/api/PlayerDataManager.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/api/src/main/java/com/imaginarycode/minecraft/redisbungee/api/PlayerDataManager.java b/api/src/main/java/com/imaginarycode/minecraft/redisbungee/api/PlayerDataManager.java index c102644..4a25d24 100644 --- a/api/src/main/java/com/imaginarycode/minecraft/redisbungee/api/PlayerDataManager.java +++ b/api/src/main/java/com/imaginarycode/minecraft/redisbungee/api/PlayerDataManager.java @@ -270,7 +270,12 @@ public abstract class PlayerDataManager builder.put(response.get(), uuid)); + responses.forEach((uuid, response) -> { + String key = response.get(); + if (key == null) return; + + builder.put(key, uuid); + }); return builder.build(); } @@ -281,7 +286,12 @@ public abstract class PlayerDataManager builder.put(response.get(), uuid)); + responses.forEach((uuid, response) -> { + String key = response.get(); + if (key == null) return; + + builder.put(key, uuid); + }); return builder.build(); } }.call();