Fix CustomSkinAPIPlus loading incorrectly. Fix unable to complete config with default value. (#168)

This commit is contained in:
ZekerZhayard authored and GitHub committed 2021-05-25 12:55:42 +08:00
1 parent 3e001c4cdf
commit 4df8ce38d6
12 files changed
+240 -114

No files matched your search

@@ -10,11 +10,11 @@ import customskinloader.plugin.PluginLoader;
import customskinloader.profile.UserProfile;
public class ProfileLoader {
public static final HashMap<String,IProfileLoader> LOADERS=initLoaders();
public static final HashMap<String, IProfileLoader> LOADERS = initLoaders();
private static HashMap<String, IProfileLoader> initLoaders() {
HashMap<String, ProfileLoader.IProfileLoader> profileLoaders = new HashMap<String, ProfileLoader.IProfileLoader>();
for (ICustomSkinLoaderPlugin plugin : PluginLoader.PLUGINS.values()) {
HashMap<String, ProfileLoader.IProfileLoader> profileLoaders = new HashMap<>();
for (ICustomSkinLoaderPlugin plugin : PluginLoader.PLUGINS) {
ProfileLoader.IProfileLoader profileLoader = plugin.getProfileLoader();
if (profileLoader != null) {
profileLoaders.put(profileLoader.getName().toLowerCase(), profileLoader);