修复空指针报错...

Signed-off-by: 502647092 <jtb1@163.com>
This commit is contained in:
502647092 2015-11-29 18:00:19 +08:00
parent 56058007b5
commit 599c3e9a30

View File

@ -587,7 +587,7 @@ public class PluginsManager {
} }
result = true; result = true;
sender.sendMessage("§6升级: §a开始升级 " + name + " 插件!"); sender.sendMessage("§6升级: §a开始升级 " + name + " 插件!");
if (!unload(plugin)) { if (plugin != null && !unload(plugin)) {
FileUtil.copy(file, new File(Bukkit.getUpdateFolderFile().getParentFile(), File.separatorChar + file.getName())); FileUtil.copy(file, new File(Bukkit.getUpdateFolderFile().getParentFile(), File.separatorChar + file.getName()));
} }
load(name); load(name);