From e5f212fd6b96a1b6dca700acac54c0f8ef157f6a Mon Sep 17 00:00:00 2001 From: coding Date: Tue, 17 Oct 2017 06:49:55 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=88=A0=E9=99=A4=E6=97=A7=E6=8F=92?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/plugins/hello.js | 52 ----------------------------- 1 file changed, 52 deletions(-) delete mode 100644 src/main/resources/plugins/hello.js diff --git a/src/main/resources/plugins/hello.js b/src/main/resources/plugins/hello.js deleted file mode 100644 index 87ee6e1..0000000 --- a/src/main/resources/plugins/hello.js +++ /dev/null @@ -1,52 +0,0 @@ -'use strict'; -/** - * Hello Wrold 测试插件 - */ -/*global Java, base, module, exports, require*/ - -var event = require('modules/event'); -var cmd = require('modules/command'); -var join; - -var description = { - name: 'HelloWorld', - version: '1.0' -}; - -function load() { - console.log('载入 Hello Wrold 测试插件!'); -} - -function enable() { - console.log('启用 Hello Wrold 测试插件!'); - join = event.on(this, 'playerloginevent', function join(event) { - // noinspection JSUnresolvedVariable - log.d('玩家 %s 触发事件 %s', event.player.name, event.name); - setTimeout(function () { - // noinspection JSUnresolvedVariable - event.player.sendMessage(require("plugins/ext/papi").$(event.player, "§a欢迎来到 §bMiaoScript §a的世界! 当前在线: %server_online%")); - }, 10); - }); - cmd.on(this, 'hello', { - cmd: function (sender, command, args) { - console.log(command, args.join(' ')); - return true; - }, - tab: function (sender, command, args) { - return 'test'; - } - }); -} - -function disable() { - console.log('卸载 Hello Wrold 测试插件!'); - // 可以不用关闭事件 程序将自动处理 - // event.off(join); -} - -module.exports = { - description: description, - load: load, - enable: enable, - disable: disable -}; \ No newline at end of file