1
0
mirror of https://e.coding.net/circlecloud/SimpleProtect.git synced 2024-11-22 01:49:03 +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,22 +48,13 @@ public class SimpleProtectCommand implements CommandExecutor {
sender.sendMessage(plugin.pluginname + "§a配置文件已重载!"); sender.sendMessage(plugin.pluginname + "§a配置文件已重载!");
return true; return true;
case "list": case "list":
sender.sendMessage("§c当前被禁言的玩家有: ");
break; for (String player : plugin.spam.getCc()) {
case "admin": sender.sendMessage("§6 - " + player);
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; return true;
} }
break; break;
}
break;
case 2: case 2:
Player p = Bukkit.getPlayer(args[1]); Player p = Bukkit.getPlayer(args[1]);
@ -76,6 +67,7 @@ public class SimpleProtectCommand implements CommandExecutor {
} else { } else {
sender.sendMessage(plugin.getfullmsg("Spam.OffLine")); sender.sendMessage(plugin.getfullmsg("Spam.OffLine"));
} }
return true;
case "del": case "del":
if (p != null && plugin.spam.getCc().contains(p.getName())) { if (p != null && plugin.spam.getCc().contains(p.getName())) {
plugin.spam.getCc().remove(p); plugin.spam.getCc().remove(p);
@ -84,6 +76,19 @@ public class SimpleProtectCommand implements CommandExecutor {
} else { } else {
sender.sendMessage(plugin.getfullmsg("Spam.NotMute")); 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; break;
} }

View File

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