diff --git a/src/main/java/pw/yumc/Yum/managers/RepositoryManager.java b/src/main/java/pw/yumc/Yum/managers/RepositoryManager.java index e42925b..5eea713 100644 --- a/src/main/java/pw/yumc/Yum/managers/RepositoryManager.java +++ b/src/main/java/pw/yumc/Yum/managers/RepositoryManager.java @@ -12,7 +12,6 @@ import java.util.Map.Entry; import org.bukkit.Bukkit; import org.bukkit.command.CommandSender; -import cn.citycraft.PluginHelper.PluginHelperLogger; import cn.citycraft.PluginHelper.jsonresult.JsonHandle; import cn.citycraft.PluginHelper.kit.HttpKit; import cn.citycraft.PluginHelper.kit.StrKit; @@ -32,7 +31,6 @@ import pw.yumc.Yum.models.RepoSerialization.URLType; * @since 2016年1月9日 上午10:02:57 */ public class RepositoryManager { - PluginHelperLogger logger = PluginHelperLogger.getLogger(); org.bukkit.plugin.Plugin main; RepoCache repocache; @@ -207,7 +205,7 @@ public class RepositoryManager { sender = Bukkit.getConsoleSender(); } if (repocenter == null || repocenter.repos.isEmpty()) { - logger.debug("源地址为Null或源列表为空!"); + sender.sendMessage("源地址为Null或源列表为空!"); return false; } for (final Repository repo : repocenter.repos) { diff --git a/src/main/java/pw/yumc/Yum/models/RepoCache.java b/src/main/java/pw/yumc/Yum/models/RepoCache.java index 572cf15..caf7c76 100644 --- a/src/main/java/pw/yumc/Yum/models/RepoCache.java +++ b/src/main/java/pw/yumc/Yum/models/RepoCache.java @@ -7,13 +7,12 @@ import java.util.List; import java.util.Map; import java.util.Map.Entry; -import cn.citycraft.PluginHelper.PluginHelperLogger; import cn.citycraft.PluginHelper.jsonresult.JsonHandle; +import cn.citycraft.PluginHelper.kit.PluginKit; import cn.citycraft.PluginHelper.utils.IOUtil; import pw.yumc.Yum.models.RepoSerialization.Repositories; public class RepoCache implements Serializable { - PluginHelperLogger logger = PluginHelperLogger.getLogger(); Map plugins = new HashMap(); Map repos = new HashMap(); @@ -27,7 +26,6 @@ public class RepoCache implements Serializable { public Repositories addRepo(final String repo) { if (repos.containsKey(repo) || repo.isEmpty()) { - logger.debug("源地址为空或已存在 " + repo); return null; } final Repositories reposes = getRepo(repo); @@ -53,12 +51,12 @@ public class RepoCache implements Serializable { public Repositories getRepo(final String repo) { final String json = IOUtil.getData(repo); if (json == null || json.isEmpty()) { - logger.debug("源地址获取数据为空 " + repo); + PluginKit.sc("§c源地址获取数据为空 §b" + repo); return null; } final Repositories reposes = JsonHandle.fromJson(json, Repositories.class); if (reposes == null || reposes.repos.isEmpty()) { - logger.debug("源地址解析Json为空 " + repo); + PluginKit.sc("§c源地址解析Json为空 §b" + repo); return null; } return reposes;