Fixed fetching skin message never being cleared

This commit is contained in:
Sollace 2018-08-22 15:45:18 +02:00
parent aa1a6e0002
commit 3cc26b7cd1

View file

@ -206,20 +206,21 @@ public class SkinUploader implements Closeable {
throttlingNeck = false;
offline = false;
remotePlayer.reloadRemoteSkin(this, this::onSetRemoteSkin).exceptionally(throwable -> {
throwable = throwable.getCause();
throwable.printStackTrace();
remotePlayer.reloadRemoteSkin(this, this::onSetRemoteSkin).handle((a, throwable) -> {
fetchingSkin = false;
if (throwable != null) {
throwable = throwable.getCause();
if (throwable instanceof AuthenticationUnavailableException) {
offline = true;
} else {
throttlingNeck = true;
throwable.printStackTrace();
if (throwable instanceof AuthenticationUnavailableException) {
offline = true;
} else {
throttlingNeck = true;
}
}
return null;
return a;
});
}