mirror of
https://e.coding.net/circlecloud/Yum.git
synced 2024-11-22 14:28:46 +00:00
fix somebug and remove supput 1.7.10 spigot unless you package up Gson..
Signed-off-by: 502647092 <jtb1@163.com>
This commit is contained in:
parent
6a38e82bea
commit
3e22a6f6be
4
pom.xml
4
pom.xml
@ -3,7 +3,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>cn.citycraft</groupId>
|
||||
<artifactId>Yum</artifactId>
|
||||
<version>1.7.2</version>
|
||||
<version>1.7.3</version>
|
||||
<name>Yum</name>
|
||||
<description>Minecraft 服务器插件管理系统</description>
|
||||
<build>
|
||||
@ -60,7 +60,7 @@
|
||||
</build>
|
||||
<properties>
|
||||
<jenkins.url>http://ci.citycraft.cn:8080</jenkins.url>
|
||||
<update.description>更新7老板底层Gson库 移除Plugin Metrics...</update.description>
|
||||
<update.description>\u00A7a移除对纯净1.7.10的支持\u00A7c(去怪7老板= =) \u00A73修复一个迭代错误...</update.description>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
<repositories>
|
||||
|
@ -9,6 +9,7 @@ import java.io.InputStreamReader;
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
@ -18,14 +19,13 @@ import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
|
||||
import com.google.common.base.Charsets;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonSyntaxException;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
|
||||
import cn.citycraft.Yum.manager.Repositories.PackageInfo;
|
||||
import cn.citycraft.Yum.manager.Repositories.Plugin;
|
||||
import cn.citycraft.Yum.manager.Repositories.Repository;
|
||||
import cn.mcraft.gson.GsonLib;
|
||||
import cn.mcraft.gson.api.Gson;
|
||||
import cn.mcraft.gson.api.exception.JsonSyntaxException;
|
||||
import cn.mcraft.gson.api.reflect.TypeToken;;
|
||||
|
||||
/**
|
||||
* 仓库管理类
|
||||
@ -41,7 +41,7 @@ public class RepositoryManager {
|
||||
|
||||
public RepositoryManager(final org.bukkit.plugin.Plugin plugin) {
|
||||
this.main = plugin;
|
||||
gson = GsonLib.newGson();
|
||||
gson = new Gson();
|
||||
plugins = new HashMap<String, PluginInfo>();
|
||||
repos = new ArrayList<String>();
|
||||
}
|
||||
@ -214,7 +214,9 @@ public class RepositoryManager {
|
||||
if (repos.isEmpty()) {
|
||||
repos.add("http://citycraft.cn/repo/repo.info");
|
||||
}
|
||||
for (final String string : repos) {
|
||||
final Iterator<String> keys = repos.iterator();
|
||||
while (keys.hasNext()) {
|
||||
final String string = keys.next();
|
||||
if (updateRepositories(sender, string)) {
|
||||
sender.sendMessage("§6源: §e" + string + " §a更新成功!");
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user