2016-07-31 22:00:46 +08:00
|
|
|
package customskinloader.profile;
|
2016-02-27 15:22:35 +08:00
|
|
|
|
|
|
|
|
/**The instance to storage user's profile in memory temporarily.
|
|
|
|
|
* In this manner, it could be easier to pass profile in program.
|
|
|
|
|
* @since 13.1
|
|
|
|
|
*/
|
|
|
|
|
public class UserProfile {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Direct url for skin.
|
|
|
|
|
* @since 13.1
|
|
|
|
|
*/
|
|
|
|
|
public String skinUrl=null;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Model for skin.
|
|
|
|
|
* default/slim
|
|
|
|
|
* @since 13.1
|
|
|
|
|
*/
|
|
|
|
|
public String model=null;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Direct url for cape.
|
|
|
|
|
* @since 13.1
|
|
|
|
|
*/
|
|
|
|
|
public String capeUrl=null;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get parsed String to output the instance.
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public String toString(){
|
2016-07-31 22:00:46 +08:00
|
|
|
return toString(0);
|
|
|
|
|
}
|
|
|
|
|
public String toString(long expiry){
|
|
|
|
|
return "(SkinUrl: "+skinUrl+" , Model: "+model+" , CapeUrl: "+capeUrl+(expiry==0?"":(" , Expiry: "+expiry))+")";
|
2016-02-27 15:22:35 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Check if the instance is empty.
|
|
|
|
|
* @return status (true - empty)
|
|
|
|
|
*/
|
|
|
|
|
public boolean isEmpty(){
|
2016-04-03 13:01:06 +08:00
|
|
|
return skinUrl==null && (model==null||model.equalsIgnoreCase("default")) && capeUrl==null;
|
2016-02-27 15:22:35 +08:00
|
|
|
}
|
|
|
|
|
}
|