update
This commit is contained in:
parent
42e01c4b78
commit
892086d62d
3 changed files with 25 additions and 1 deletions
|
@ -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("{}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue