Merge remote-tracking branch 'origin/master'

This commit is contained in:
j502647092 2015-10-23 22:30:15 +08:00
commit 6a38e82bea
2 changed files with 5 additions and 4 deletions

View File

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>cn.citycraft</groupId> <groupId>cn.citycraft</groupId>
<artifactId>Yum</artifactId> <artifactId>Yum</artifactId>
<version>1.7.1</version> <version>1.7.2</version>
<name>Yum</name> <name>Yum</name>
<description>Minecraft 服务器插件管理系统</description> <description>Minecraft 服务器插件管理系统</description>
<build> <build>

View File

@ -10,6 +10,7 @@ import java.net.URL;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.Map.Entry; import java.util.Map.Entry;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
@ -34,7 +35,7 @@ import cn.mcraft.gson.api.reflect.TypeToken;;
public class RepositoryManager { public class RepositoryManager {
Gson gson; Gson gson;
org.bukkit.plugin.Plugin main; org.bukkit.plugin.Plugin main;
HashMap<String, PluginInfo> plugins; Map<String, PluginInfo> plugins;
List<String> repos; List<String> repos;
@ -154,7 +155,7 @@ public class RepositoryManager {
return plugins.get(groupId + "." + artifactId); return plugins.get(groupId + "." + artifactId);
} }
public HashMap<String, PluginInfo> getPlugins() { public Map<String, PluginInfo> getPlugins() {
return plugins; return plugins;
} }
@ -171,7 +172,7 @@ public class RepositoryManager {
}.getType()); }.getType());
} }
if (plugincache != null && !plugincache.isEmpty()) { if (plugincache != null && !plugincache.isEmpty()) {
plugins = gson.fromJson(plugincache, new TypeToken<HashMap<String, PluginInfo>>() { plugins = gson.fromJson(plugincache, new TypeToken<Map<String, PluginInfo>>() {
}.getType()); }.getType());
} }
return true; return true;