fix: 修复下载错误的问题
This commit is contained in:
parent
4dec6bca98
commit
bc6e07cfc8
@ -138,16 +138,16 @@ function del(sender, name) {
|
|||||||
function download(sender, name) {
|
function download(sender, name) {
|
||||||
var plugin = packageCache[name];
|
var plugin = packageCache[name];
|
||||||
if (!plugin) {
|
if (!plugin) {
|
||||||
console.sender(sender, '§c插件§b', name, '§c不存在')
|
console.sender(sender, '§c插件§b', name, '§c不存在');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var pfile = fs.file(__dirname, pname + '.js')
|
var pfile = fs.file(__dirname, name + '.js');
|
||||||
console.sender(sender, '§6开始下载插件: §b%s'.format(pkg.name))
|
console.sender(sender, '§6开始下载插件: §b%s'.format(pkg.name));
|
||||||
console.sender(sender, '§6插件下载地址: §b%s'.format(pkg.url))
|
console.sender(sender, '§6插件下载地址: §b%s'.format(pkg.url));
|
||||||
fs.save(pfile, http.get(pkg.url))
|
fs.save(pfile, http.get(pkg.url));
|
||||||
console.sender(sender, '§6插件 §b%s §a下载完毕 开始加载 ...'.format(pname))
|
console.sender(sender, '§6插件 §b%s §a下载完毕 开始加载 ...'.format(name));
|
||||||
manager.loadPlugin(pfile)
|
manager.loadPlugin(pfile);
|
||||||
console.sender(sender, '§6插件 §b%s §a安装成功!'.format(pname))
|
console.sender(sender, '§6插件 §b%s §a安装成功!'.format(name));
|
||||||
}
|
}
|
||||||
|
|
||||||
function disable() {
|
function disable() {
|
||||||
|
Loading…
Reference in New Issue
Block a user