From 5a5b1d160f13aaf09845021670aa0db4b9ce56e2 Mon Sep 17 00:00:00 2001 From: coding Date: Thu, 30 Nov 2017 05:21:52 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=B0=83=E6=95=B4=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=E7=BB=93=E6=9E=84=20=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?=E5=85=BC=E5=AE=B9=E6=80=A7=E5=88=86=E7=A6=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/plugins/HelloWorld.js | 4 ++-- src/main/resources/plugins/{ => bukkit}/Lottery.js | 2 +- src/main/resources/plugins/{ => bukkit}/MiaoTag.js | 0 src/main/resources/plugins/{ => bukkit}/ext/papi.js | 0 4 files changed, 3 insertions(+), 3 deletions(-) rename src/main/resources/plugins/{ => bukkit}/Lottery.js (99%) rename src/main/resources/plugins/{ => bukkit}/MiaoTag.js (100%) rename src/main/resources/plugins/{ => bukkit}/ext/papi.js (100%) diff --git a/src/main/resources/plugins/HelloWorld.js b/src/main/resources/plugins/HelloWorld.js index 0f43646..0ecc728 100644 --- a/src/main/resources/plugins/HelloWorld.js +++ b/src/main/resources/plugins/HelloWorld.js @@ -6,8 +6,8 @@ var event = require('api/event'); var command = require('api/command'); +var server = require('api/server') var fs = require('fs'); -var papi = require('./ext/papi'); var join; var description = { @@ -37,7 +37,7 @@ function enable() { console.debug('玩家', event.player.name, "触发事件", event.name); setTimeout(function () { // noinspection JSUnresolvedVariable - event.player.sendMessage(papi.$(event.player, "§a欢迎来到 §bMiaoScript §a的世界! 当前在线: %server_online%")); + event.player.sendMessage("§a欢迎来到 §bMiaoScript §a的世界! 当前在线: " + server.players.length); }, 10); }); } diff --git a/src/main/resources/plugins/Lottery.js b/src/main/resources/plugins/bukkit/Lottery.js similarity index 99% rename from src/main/resources/plugins/Lottery.js rename to src/main/resources/plugins/bukkit/Lottery.js index 495777c..dc225e6 100644 --- a/src/main/resources/plugins/Lottery.js +++ b/src/main/resources/plugins/bukkit/Lottery.js @@ -16,7 +16,7 @@ var description = { name: 'Lottery', version: '1.0', commands: { - 'l': { + 'lottery': { description: 'Lottery主命令' } }, diff --git a/src/main/resources/plugins/MiaoTag.js b/src/main/resources/plugins/bukkit/MiaoTag.js similarity index 100% rename from src/main/resources/plugins/MiaoTag.js rename to src/main/resources/plugins/bukkit/MiaoTag.js diff --git a/src/main/resources/plugins/ext/papi.js b/src/main/resources/plugins/bukkit/ext/papi.js similarity index 100% rename from src/main/resources/plugins/ext/papi.js rename to src/main/resources/plugins/bukkit/ext/papi.js