mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-29 23:48:00 +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;
|
||||
}
|
||||
|
||||
public boolean hasRemoteTexture() {
|
||||
return hasRemote() && remote.isTextureUploaded() && getTexture() != blank.getBlankSkin(type);
|
||||
}
|
||||
|
||||
public boolean usingLocal() {
|
||||
return !hasRemote() && hasLocal();
|
||||
}
|
||||
|
|
|
@ -141,7 +141,7 @@ public class SkinUploader implements Closeable {
|
|||
}
|
||||
|
||||
public boolean canClear() {
|
||||
return !isOffline() && !hasStatus() && !downloadInProgress() && remotePlayer.isTextureSetupComplete();
|
||||
return !isOffline() && !hasStatus() && !downloadInProgress() && remotePlayer.isUsingRemoteTexture();
|
||||
}
|
||||
|
||||
public boolean hasStatus() {
|
||||
|
|
|
@ -79,6 +79,10 @@ public class EntityPlayerModel extends EntityLivingBase implements IBlankSkinSup
|
|||
return skin.uploadComplete() && elytra.uploadComplete();
|
||||
}
|
||||
|
||||
public boolean isUsingRemoteTexture() {
|
||||
return skin.hasRemoteTexture() || elytra.hasRemoteTexture();
|
||||
}
|
||||
|
||||
public void releaseTextures() {
|
||||
skin.clearLocal();
|
||||
elytra.clearLocal();
|
||||
|
|
Loading…
Reference in a new issue