1
0
mirror of https://e.coding.net/circlecloud/GuiACK.git synced 2024-12-04 16:38:48 +00:00

add test command...

Signed-off-by: 502647092 <jtb1@163.com>
This commit is contained in:
502647092 2015-09-21 20:40:23 +08:00
parent 6e30713886
commit 37fa0a28f8
2 changed files with 9 additions and 2 deletions

View File

@ -25,10 +25,14 @@ public class GuiACK extends JavaPlugin {
@Override @Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (args.length == 1 && args[0].equalsIgnoreCase("reload") && (sender.hasPermission("gack.reload") || sender.isOp())) { if (args.length != 1)
return false;
if (args[0].equalsIgnoreCase("reload") && (sender.hasPermission("gack.reload") || sender.isOp())) {
onLoad(); onLoad();
sender.sendMessage("配置文件已重载!"); sender.sendMessage("配置文件已重载!");
} }
if (args[0].equalsIgnoreCase("test") && sender instanceof Player && (sender.hasPermission("gack.test") || sender.isOp()))
VerifyGui.open((Player) sender);
return true; return true;
} }

View File

@ -7,8 +7,11 @@ website: http://ci.citycraft.cn:8800/jenkins/job/${project.artifactId}/
commands: commands:
gack: gack:
description: gack description: gack
usage: §b使用/gack help 查看帮助! usage: §b使用/gack [test(测试插件)|reload(重载插件)]!
permissions: permissions:
gack.test:
description: 测试插件权限!
default: op
gack.reload: gack.reload:
description: 重新载入插件! description: 重新载入插件!
default: op default: op