[FIX] TextureProvider NPE error message

This commit is contained in:
Gravita 2021-09-04 19:53:56 +07:00
parent 077e6f3053
commit 8694963313

View file

@ -303,6 +303,9 @@ public PlayerProfile getPlayerProfile(AuthProviderPair pair, User user) {
if (user instanceof UserSupportTextures) {
return new PlayerProfile(user.getUUID(), user.getUsername(), ((UserSupportTextures) user).getSkinTexture(), ((UserSupportTextures) user).getCloakTexture());
}
if (pair.textureProvider == null) {
throw new NullPointerException("TextureProvider not found");
}
return getPlayerProfile(user.getUUID(), user.getUsername(), "", pair.textureProvider);
}