mirror of
https://github.com/Suiranoil/SkinRestorer.git
synced 2026-01-16 04:42:12 +00:00
replace createCache with reload
This commit is contained in:
@@ -93,9 +93,9 @@ public final class SkinRestorer {
|
|||||||
Translation.reloadTranslations();
|
Translation.reloadTranslations();
|
||||||
WebUtils.recreateHttpClient();
|
WebUtils.recreateHttpClient();
|
||||||
|
|
||||||
MojangSkinProvider.createCache();
|
MojangSkinProvider.reload();
|
||||||
ElyBySkinProvider.createCache();
|
ElyBySkinProvider.reload();
|
||||||
MineskinSkinProvider.createCache();
|
MineskinSkinProvider.reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String assetPath(String name) {
|
public static String assetPath(String name) {
|
||||||
|
|||||||
@@ -40,7 +40,11 @@ public final class ElyBySkinProvider implements SkinProvider {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void createCache() {
|
public static void reload() {
|
||||||
|
createCache();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void createCache() {
|
||||||
var config = SkinRestorer.getConfig().providersConfig().ely_by();
|
var config = SkinRestorer.getConfig().providersConfig().ely_by();
|
||||||
var time = config.cache().enabled() ? config.cache().duration() : 0;
|
var time = config.cache().enabled() ? config.cache().duration() : 0;
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,11 @@ public final class MineskinSkinProvider implements SkinProvider {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void createCache() {
|
public static void reload() {
|
||||||
|
createCache();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void createCache() {
|
||||||
var config = SkinRestorer.getConfig().providersConfig().mineskin();
|
var config = SkinRestorer.getConfig().providersConfig().mineskin();
|
||||||
var time = config.cache().enabled() ? config.cache().duration() : 0;
|
var time = config.cache().enabled() ? config.cache().duration() : 0;
|
||||||
|
|
||||||
|
|||||||
@@ -56,11 +56,13 @@ public final class MojangSkinProvider implements SkinProvider {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, SkinRestorer.getConfigDir().resolve(PROFILE_CACHE_FILENAME).toFile());
|
}, SkinRestorer.getConfigDir().resolve(PROFILE_CACHE_FILENAME).toFile());
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void createCache() {
|
public static void reload() {
|
||||||
|
createCache();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void createCache() {
|
||||||
var config = SkinRestorer.getConfig().providersConfig().mojang();
|
var config = SkinRestorer.getConfig().providersConfig().mojang();
|
||||||
var time = config.cache().enabled() ? config.cache().duration() : 0;
|
var time = config.cache().enabled() ? config.cache().duration() : 0;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user