1
0
mirror of https://e.coding.net/circlecloud/SimpleProtect.git synced 2024-12-29 07:59:04 +00:00

fix admin command...

Signed-off-by: j502647092 <jtb1@163.com>
This commit is contained in:
j502647092 2015-07-26 19:58:32 +08:00
parent ef43de56e8
commit 35eba952a0
2 changed files with 19 additions and 14 deletions

View File

@ -48,20 +48,11 @@ public class SimpleProtectCommand implements CommandExecutor {
sender.sendMessage(plugin.pluginname + "§a配置文件已重载!");
return true;
case "list":
break;
case "admin":
if (args[1].equalsIgnoreCase("on")) {
plugin.spam.setAdminchat(true);
sender.sendMessage(plugin.getfullmsg("Spam.AdminChatOn"));
return true;
sender.sendMessage("§c当前被禁言的玩家有: ");
for (String player : plugin.spam.getCc()) {
sender.sendMessage("§6 - " + player);
}
if (args[1].equalsIgnoreCase("off")) {
plugin.spam.setAdminchat(false);
sender.sendMessage(plugin.getfullmsg("Spam.AdminChatOff"));
return true;
}
break;
return true;
}
break;
@ -76,6 +67,7 @@ public class SimpleProtectCommand implements CommandExecutor {
} else {
sender.sendMessage(plugin.getfullmsg("Spam.OffLine"));
}
return true;
case "del":
if (p != null && plugin.spam.getCc().contains(p.getName())) {
plugin.spam.getCc().remove(p);
@ -84,6 +76,19 @@ public class SimpleProtectCommand implements CommandExecutor {
} else {
sender.sendMessage(plugin.getfullmsg("Spam.NotMute"));
}
return true;
case "admin":
if (args[1].equalsIgnoreCase("on")) {
plugin.spam.setAdminchat(true);
sender.sendMessage(plugin.getfullmsg("Spam.AdminChatOn"));
return true;
}
if (args[1].equalsIgnoreCase("off")) {
plugin.spam.setAdminchat(false);
sender.sendMessage(plugin.getfullmsg("Spam.AdminChatOff"));
return true;
}
break;
}
break;
}

View File

@ -5,7 +5,7 @@ version: 0.0.2
commands:
simpleprotect:
description: 简单保护插件
aliaese: [sp]
aliaese: [sp,smp]
usage: §b使用/sp help 查看帮助!
permission: sp.*
permission-message: §c你没有 <permission> 的权限来执行此命令!