feat: 修改脚本作者名称
This commit is contained in:
parent
7822803376
commit
d67f2843b0
@ -11,7 +11,7 @@
|
||||
- 诞生于 `2016年08月25日` 这是 Git 上的第一个提交 具体啥时候我也忘了
|
||||
- 起初 `MiaoScript` 只是用于服务器其他插件的变量执行 并且依赖于PAPI(不知道是啥的自己百度)
|
||||
- 比如 [`MiaoMenu`](http://w.yumc.pw/zc/MiaoMenu.html) 的部分复杂脚本
|
||||
- 比如 [`MiaoChat`](http://mcbbs.tvt.im/thread-631240-1-1.html) 的聊天变量
|
||||
- 比如 [`MiaoChat`](http://mcbbs.net/thread-631240-1-1.html) 的聊天变量
|
||||
- 突然有一天 圈内的大佬 `QSB` @qiu1995 过来找我 说能不能用脚本监听玩家的事件
|
||||
- PS: 这货自从用过 `DeluxeMenu` 之后就喜欢上了用JS写菜单
|
||||
- 当初感觉没啥问题 就出了第一个简易的 `MiaoScript` 版本 还是用 yml 做的配置文件
|
||||
|
@ -13,6 +13,7 @@ var fs = require('fs');
|
||||
var description = {
|
||||
name: 'HelloWorld',
|
||||
version: '1.0',
|
||||
author: 'MiaoWoo',
|
||||
commands: {
|
||||
'hello': {
|
||||
description: 'HelloWorld主命令'
|
||||
|
@ -10,7 +10,7 @@ var Keys;
|
||||
var description = {
|
||||
name: 'ItemTag',
|
||||
version: '1.0',
|
||||
author: '喵♂呜'
|
||||
author: 'MiaoWoo'
|
||||
};
|
||||
|
||||
var itemConfig;
|
||||
|
@ -13,6 +13,7 @@ var fs = require('fs');
|
||||
var description = {
|
||||
name: 'MiaoAuth',
|
||||
version: '1.0',
|
||||
author: 'MiaoWoo',
|
||||
commands: {
|
||||
'l': {
|
||||
description: 'MiaoAuth登录命令'
|
||||
|
@ -17,7 +17,7 @@ var boards = [];
|
||||
var description = {
|
||||
name: 'MiaoBoard',
|
||||
version: '1.0',
|
||||
author: '喵呜',
|
||||
author: 'MiaoWoo',
|
||||
commands: {
|
||||
'mboard': {
|
||||
description: '喵式记分板主命令'
|
||||
|
@ -16,7 +16,7 @@ var Player;
|
||||
var description = {
|
||||
name: 'MiaoChat',
|
||||
version: '1.0',
|
||||
author: '喵呜',
|
||||
author: 'MiaoWoo',
|
||||
commands: {
|
||||
'mchat': {
|
||||
description: 'MiaoChat登录命令'
|
||||
|
@ -15,7 +15,7 @@ var packageNameCache = [];
|
||||
var description = {
|
||||
name: 'MiaoScriptPackageManager',
|
||||
version: '1.0',
|
||||
author: '喵♂呜',
|
||||
author: 'MiaoWoo',
|
||||
description: 'MiaoScript包管理工具',
|
||||
commands: {
|
||||
'mpm': {
|
||||
@ -31,7 +31,7 @@ var description = {
|
||||
var help = [
|
||||
'§6========= §6[§a' + description.name + '§6] 帮助 §aBy §b喵♂呜 §6=========',
|
||||
'§6/mpm §ainstall §e<插件名称> §6- §3安装插件',
|
||||
'§6/mpm §alist §6- §3列出仓库插件',
|
||||
'§6/mpm §alist [install]§6- §3列出仓库插件[已安装的插件]',
|
||||
'§6/mpm §aupdate §e<插件名称> §6- §3更新插件(无插件名称则更新源)',
|
||||
'§6/mpm §aupgrade §e<插件名称> §6- §3及时更新插件(update需要重启生效)',
|
||||
'§6/mpm §areload §e<插件名称> §6- §3重载插件(无插件名称则重载自身)',
|
||||
@ -80,10 +80,18 @@ function main(sender, command, args){
|
||||
}
|
||||
switch (args[0]) {
|
||||
case "list":
|
||||
console.sender(sender, '§6当前 §bMiaoScriptPackageCenter §6中存在下列插件:');
|
||||
for (var pkgName in packageCache) {
|
||||
var pkg = packageCache[pkgName];
|
||||
console.sender(sender, '§6插件名称: §b%s §6版本: §a%s'.format(pkg.name, pkg.version))
|
||||
if (args[1]) {
|
||||
console.sender(sender, '§6当前 §bMiaoScript §6已安装下列插件:');
|
||||
pluginCache.forEach(function listInfo(pluginName){
|
||||
var desc = manager.plugins[pluginName].description;
|
||||
console.sender(sender, '§6插件名称: §b%s §6版本: §a%s §6作者: §3%s'.format(desc.name, desc.version || '1.0', desc.author || '未知'))
|
||||
})
|
||||
} else {
|
||||
console.sender(sender, '§6当前 §bMiaoScriptPackageCenter §6中存在下列插件:');
|
||||
for (var pkgName in packageCache) {
|
||||
var pkg = packageCache[pkgName];
|
||||
console.sender(sender, '§6插件名称: §b%s §6版本: §a%s §6作者: §3%s'.format(pkg.name, pkg.version || '1.0', pkg.author || '未知'))
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "install":
|
||||
@ -98,7 +106,7 @@ function main(sender, command, args){
|
||||
update(sender, args[1]);
|
||||
} else {
|
||||
load();
|
||||
console.sender(sender, "§a仓库缓存刷新成功 共存在 §b" + pluginCache.length + " §a个插件!")
|
||||
console.sender(sender, "§a仓库缓存刷新成功 共存在 §b" + Object.keys(packageCache).length + " §a个插件!")
|
||||
}
|
||||
break;
|
||||
case "upgrade":
|
||||
@ -171,12 +179,13 @@ function del(sender, name) {
|
||||
}
|
||||
manager.disable(name);
|
||||
fs.delete(plugin.__FILE__);
|
||||
console.sender(sender, '§c插件 §b%s §c删除成功!'.format(name));
|
||||
}
|
||||
|
||||
function download(sender, name) {
|
||||
var plugin = packageCache[name];
|
||||
if (!plugin) {
|
||||
console.sender(sender, '§c插件§b', name, '§c不存在');
|
||||
console.sender(sender, '§c插件 §b%s §c不存在!'.format(name));
|
||||
return;
|
||||
}
|
||||
var pfile = fs.file(__dirname, name + '.js');
|
||||
|
Loading…
Reference in New Issue
Block a user