2
0
mirror of https://github.com/proxiodev/RedisBungee.git synced 2024-12-23 02:28:01 +00:00

Added null-check for server keys (#106)

Fixes https://github.com/ProxioDev/ValioBungee/issues/105

(cherry picked from commit be0c6be2aa)
This commit is contained in:
Efe Kurban 2024-06-17 23:31:28 +03:00 committed by mohammed jasem alaajel
parent e0bca62cdb
commit 981d42d4a8
Signed by: ham1255
GPG Key ID: EF343502046229F4

View File

@ -251,7 +251,12 @@ public abstract class PlayerDataManager<P, LE, DE, PS extends IPubSubMessageEven
responses.put(uuid, pipeline.hget("redis-bungee::" + networkId + "::player::" + uuid + "::data", "server"));
}
pipeline.sync();
responses.forEach((uuid, response) -> builder.put(response.get(), uuid));
responses.forEach((uuid, response) -> {
String key = response.get();
if (key == null) return;
builder.put(key, uuid);
});
return builder.build();
}
@ -262,7 +267,12 @@ public abstract class PlayerDataManager<P, LE, DE, PS extends IPubSubMessageEven
responses.put(uuid, pipeline.hget("redis-bungee::" + networkId + "::player::" + uuid + "::data", "server"));
}
pipeline.sync();
responses.forEach((uuid, response) -> 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();