diff --git a/src/hdskins/java/com/voxelmodpack/hdskins/HDSkinManager.java b/src/hdskins/java/com/voxelmodpack/hdskins/HDSkinManager.java index a1841c99..9b4747e1 100644 --- a/src/hdskins/java/com/voxelmodpack/hdskins/HDSkinManager.java +++ b/src/hdskins/java/com/voxelmodpack/hdskins/HDSkinManager.java @@ -205,18 +205,11 @@ public final class HDSkinManager implements IResourceManagerReloadListener { private Map loadProfileData(GameProfile profile) { Map textures = Maps.newEnumMap(Type.class); - for (SkinServer server : skinServers) { - Optional profileData = server.loadProfileData(profile); - if (profileData.isPresent()) { - profileData.get().getTextures().forEach(textures::putIfAbsent); - } - - if (textures.size() == Type.values().length) { - return textures; - } - - } + skinServers.forEach(server -> server + .loadProfileData(profile) + .map(MinecraftTexturesPayload::getTextures) + .ifPresent(a -> a.forEach(textures::putIfAbsent))); return textures; } diff --git a/src/hdskins/java/com/voxelmodpack/hdskins/server/AbstractSkinServer.java b/src/hdskins/java/com/voxelmodpack/hdskins/server/AbstractSkinServer.java index 25f2bc7f..99b50ebe 100644 --- a/src/hdskins/java/com/voxelmodpack/hdskins/server/AbstractSkinServer.java +++ b/src/hdskins/java/com/voxelmodpack/hdskins/server/AbstractSkinServer.java @@ -32,7 +32,9 @@ public abstract class AbstractSkinServer implements SkinServer { @Override public Map getPreviewTextures(GameProfile profile) { - return loadProfileData(profile).map(MinecraftTexturesPayload::getTextures).orElse(Collections.emptyMap()); + return loadProfileData(profile) + .map(MinecraftTexturesPayload::getTextures) + .orElse(Collections.emptyMap()); } @Override