mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-26 14:27:59 +01:00
Only enable the clear/download buttons when there is something to clear/download
This commit is contained in:
parent
94cdda95ea
commit
ee61b56ceb
3 changed files with 9 additions and 1 deletions
|
@ -59,6 +59,10 @@ public class LocalTexture {
|
||||||
return local != null;
|
return local != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean hasRemoteTexture() {
|
||||||
|
return hasRemote() && remote.isTextureUploaded() && getTexture() != blank.getBlankSkin(type);
|
||||||
|
}
|
||||||
|
|
||||||
public boolean usingLocal() {
|
public boolean usingLocal() {
|
||||||
return !hasRemote() && hasLocal();
|
return !hasRemote() && hasLocal();
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,7 +141,7 @@ public class SkinUploader implements Closeable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean canClear() {
|
public boolean canClear() {
|
||||||
return !isOffline() && !hasStatus() && !downloadInProgress() && remotePlayer.isTextureSetupComplete();
|
return !isOffline() && !hasStatus() && !downloadInProgress() && remotePlayer.isUsingRemoteTexture();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasStatus() {
|
public boolean hasStatus() {
|
||||||
|
|
|
@ -79,6 +79,10 @@ public class EntityPlayerModel extends EntityLivingBase implements IBlankSkinSup
|
||||||
return skin.uploadComplete() && elytra.uploadComplete();
|
return skin.uploadComplete() && elytra.uploadComplete();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isUsingRemoteTexture() {
|
||||||
|
return skin.hasRemoteTexture() || elytra.hasRemoteTexture();
|
||||||
|
}
|
||||||
|
|
||||||
public void releaseTextures() {
|
public void releaseTextures() {
|
||||||
skin.clearLocal();
|
skin.clearLocal();
|
||||||
elytra.clearLocal();
|
elytra.clearLocal();
|
||||||
|
|
Loading…
Reference in a new issue