mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-02-13 16:24:23 +01:00
Fix console spam when server sends a broken texture profile.
This commit is contained in:
parent
91f741fa08
commit
1dc22f4ed4
1 changed files with 25 additions and 17 deletions
|
@ -124,6 +124,7 @@ public final class HDSkinManager implements IResourceManagerReloadListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
public CompletableFuture<Map<Type, MinecraftProfileTexture>> loadProfileTextures(GameProfile profile) {
|
public CompletableFuture<Map<Type, MinecraftProfileTexture>> loadProfileTextures(GameProfile profile) {
|
||||||
|
try {
|
||||||
// try to recreate a broken gameprofile
|
// try to recreate a broken gameprofile
|
||||||
// happens when server sends a random profile with skin and displayname
|
// happens when server sends a random profile with skin and displayname
|
||||||
Property textures = Iterables.getFirst(profile.getProperties().get("textures"), null);
|
Property textures = Iterables.getFirst(profile.getProperties().get("textures"), null);
|
||||||
|
@ -145,6 +146,13 @@ public final class HDSkinManager implements IResourceManagerReloadListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
if (profile.getId() == null) {
|
||||||
|
// Something broke server-side probably
|
||||||
|
logger.warn("{} had a null UUID and was unable to recreate it from texture profile.", profile.getName(), e);
|
||||||
|
return CompletableFuture.completedFuture(Collections.emptyMap());
|
||||||
|
}
|
||||||
|
}
|
||||||
return skins.getUnchecked(profile);
|
return skins.getUnchecked(profile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue