mirror of
https://github.com/xfl03/MCCustomSkinLoader.git
synced 2026-11-19 02:39:17 +00:00
Fix rename bug
This commit is contained in:
1 parent
be06bbb2ab
commit
f59e58a15a
8 files changed
+14
-14
No files matched your search
@@ -9,7 +9,7 @@ import customskinloader.CustomSkinLoader;
|
||||
import customskinloader.ModelManager;
|
||||
import customskinloader.UserProfile;
|
||||
import customskinloader.config.SkinSiteProfile;
|
||||
import customskinloader.utils.HttpUtil;
|
||||
import customskinloader.utils.HttpUtil0;
|
||||
|
||||
public class CustomSkinAPILoader implements IProfileLoader {
|
||||
public static final String TEXTURES="textures/";
|
||||
@@ -19,7 +19,7 @@ public class CustomSkinAPILoader implements IProfileLoader {
|
||||
CustomSkinLoader.logger.info("Root not denined.");
|
||||
return null;
|
||||
}
|
||||
String json=HttpUtil.readHttp(ssp.root+username+".json");
|
||||
String json=HttpUtil0.readHttp(ssp.root+username+".json");
|
||||
if(json==null||json.equals("")){
|
||||
CustomSkinLoader.logger.info("Profile not found.");
|
||||
return null;
|
||||
|
||||
@@ -3,7 +3,7 @@ package customskinloader.loader;
|
||||
import customskinloader.CustomSkinLoader;
|
||||
import customskinloader.UserProfile;
|
||||
import customskinloader.config.SkinSiteProfile;
|
||||
import customskinloader.utils.HttpUtil;
|
||||
import customskinloader.utils.HttpUtil0;
|
||||
|
||||
public class LegacyLoader implements IProfileLoader {
|
||||
public static final String USERNAME_REGEX="\\{USERNAME\\}";
|
||||
@@ -11,14 +11,14 @@ public class LegacyLoader implements IProfileLoader {
|
||||
public UserProfile loadProfile(SkinSiteProfile ssp, String username) throws Exception {
|
||||
UserProfile profile=new UserProfile();
|
||||
if(ssp.skin!=null && !ssp.skin.equals("")){
|
||||
String skin=HttpUtil.getRealUrl(ssp.skin.replaceAll(USERNAME_REGEX, username));
|
||||
String skin=HttpUtil0.getRealUrl(ssp.skin.replaceAll(USERNAME_REGEX, username));
|
||||
if(skin!=null&&!skin.equals("")){
|
||||
profile.skinUrl=skin;
|
||||
profile.model="default";
|
||||
}
|
||||
}
|
||||
if(ssp.cape!=null && !ssp.cape.equals("")){
|
||||
String cape=HttpUtil.getRealUrl(ssp.cape.replaceAll(USERNAME_REGEX, username));
|
||||
String cape=HttpUtil0.getRealUrl(ssp.cape.replaceAll(USERNAME_REGEX, username));
|
||||
if(cape!=null&&!cape.equals("")){
|
||||
profile.capeUrl=cape;
|
||||
}
|
||||
|
||||
@@ -14,14 +14,14 @@ import customskinloader.CustomSkinLoader;
|
||||
import customskinloader.ModelManager;
|
||||
import customskinloader.UserProfile;
|
||||
import customskinloader.config.SkinSiteProfile;
|
||||
import customskinloader.utils.HttpUtil;
|
||||
import customskinloader.utils.HttpUtil0;
|
||||
|
||||
public class MojangAPILoader implements IProfileLoader {
|
||||
|
||||
@Override
|
||||
public UserProfile loadProfile(SkinSiteProfile ssp, String username) throws Exception {
|
||||
//Get UUID Begin (http://wiki.vg/Mojang_API#Username_-.3E_UUID_at_time)
|
||||
String json0=HttpUtil.readHttp("https://api.mojang.com/users/profiles/minecraft/"+username);
|
||||
String json0=HttpUtil0.readHttp("https://api.mojang.com/users/profiles/minecraft/"+username);
|
||||
if(json0==null||json0.equals("")){
|
||||
CustomSkinLoader.logger.info("Profile not found.("+username+"'s UUID not found.)");
|
||||
return null;
|
||||
@@ -34,7 +34,7 @@ public class MojangAPILoader implements IProfileLoader {
|
||||
}
|
||||
//Get UUID End
|
||||
//Get Profile Begin (http://wiki.vg/Mojang_API#UUID_-.3E_Profile_.2B_Skin.2FCape)
|
||||
String json1=HttpUtil.readHttp("https://sessionserver.mojang.com/session/minecraft/profile/"+uuidProfile.id);
|
||||
String json1=HttpUtil0.readHttp("https://sessionserver.mojang.com/session/minecraft/profile/"+uuidProfile.id);
|
||||
if(json1==null||json1.equals("")){
|
||||
CustomSkinLoader.logger.info("Profile not found.("+username+"'s Profile is empty.)");
|
||||
return null;
|
||||
|
||||
@@ -9,7 +9,7 @@ import customskinloader.CustomSkinLoader;
|
||||
import customskinloader.ModelManager;
|
||||
import customskinloader.UserProfile;
|
||||
import customskinloader.config.SkinSiteProfile;
|
||||
import customskinloader.utils.HttpUtil;
|
||||
import customskinloader.utils.HttpUtil0;
|
||||
|
||||
public class UniSkinAPILoader implements IProfileLoader {
|
||||
public static final String TEXTURES="textures/";
|
||||
@@ -19,7 +19,7 @@ public class UniSkinAPILoader implements IProfileLoader {
|
||||
CustomSkinLoader.logger.info("Root not denined.");
|
||||
return null;
|
||||
}
|
||||
String json=HttpUtil.readHttp(ssp.root+username+".json");
|
||||
String json=HttpUtil0.readHttp(ssp.root+username+".json");
|
||||
if(json==null||json.equals("")){
|
||||
CustomSkinLoader.logger.info("Profile not found.");
|
||||
return null;
|
||||
|
||||
@@ -14,7 +14,7 @@ public class ClassTransformer implements IClassTransformer {
|
||||
public ClassTransformer() {
|
||||
ForgeTweaker.logger.info("ClassTransformer Begin");
|
||||
try {
|
||||
URLClassLoader ucl = (URLClassLoader)idv.jlchntoz.tweaker.ClassTransformer.class.getClassLoader();
|
||||
URLClassLoader ucl = (URLClassLoader)this.getClass().getClassLoader();
|
||||
URL urls[] = ucl.getURLs();
|
||||
for (int i = 0; i < urls.length; i++) {
|
||||
URL url = urls[i];
|
||||
|
||||
@@ -11,7 +11,7 @@ import net.minecraft.launchwrapper.LaunchClassLoader;
|
||||
public class ForgeTweaker implements ITweaker {
|
||||
|
||||
private static final File TWEAKER_LOG_FILE = new File("CustomSkinLoader/Tweaker.log");
|
||||
public static MainLogger logger = new MainLogger(TWEAKER_LOG_FILE);
|
||||
public static Logger logger = new Logger(TWEAKER_LOG_FILE);
|
||||
|
||||
public ForgeTweaker() {
|
||||
logger.info("Using ForgeTweaker");
|
||||
|
||||
@@ -17,7 +17,7 @@ public class Tweaker implements ITweaker {
|
||||
private String profile;
|
||||
|
||||
private static final File TWEAKER_LOG_FILE = new File("CustomSkinLoader/Tweaker.log");
|
||||
public static MainLogger logger = new MainLogger(TWEAKER_LOG_FILE);
|
||||
public static Logger logger = new Logger(TWEAKER_LOG_FILE);
|
||||
|
||||
public Tweaker() {
|
||||
logger.info("Using Tweaker");
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ import org.apache.commons.io.IOUtils;
|
||||
|
||||
import customskinloader.CustomSkinLoader;
|
||||
|
||||
public class HttpUtil {
|
||||
public class HttpUtil0 {
|
||||
/**
|
||||
* Read all text from http.
|
||||
*/
|
||||
Reference in new issue
Block a user