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

fix command error。。。

This commit is contained in:
502647092 2015-09-21 21:16:29 +08:00
parent 37fa0a28f8
commit 044d029ff1
2 changed files with 100 additions and 92 deletions

View File

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

View File

@ -8,7 +8,15 @@ commands:
gack:
description: gack
usage: §b使用/gack [test(测试插件)|reload(重载插件)]!
permission: gack.*
permission-message: §c你没有 <permission> 的权限来执行此命令!
permissions:
gack.*:
description: 图形化防挂机插件所有权限!
default: op
children:
gack.test: true
gack.reload: true
gack.test:
description: 测试插件权限!
default: op