This commit is contained in:
Paul Fey 2025-01-13 18:01:48 +01:00
parent 42e01c4b78
commit 892086d62d
3 changed files with 25 additions and 1 deletions

View file

@ -76,6 +76,8 @@ public class CosmeticSocket implements SocketHandler, ListenerAdapter {
JsonArray array = new JsonArray();
if (data.contains("data")) {
// Does not work with Hypixel for some reason
/*
for (UUID uuid : data.getStringList("data").stream().map(UUID::fromString).toList()) {
if (cosmetics.containsKey(uuid)) {
ClientMapping mapping = cosmetics.get(uuid);
@ -85,6 +87,13 @@ public class CosmeticSocket implements SocketHandler, ListenerAdapter {
array.add(target.getObject());
}
}
*/
cosmetics.forEach(((uuid, clientMapping) -> {
Json target = JsonParser.parse("{}");
target.set("uuid", uuid.toString());
target.set("cosmetics", bakeData(clientMapping.cosmetics()));
array.add(target.getObject());
}));
}
client.sendMessage(JsonParser.parse("{}")