From 3592a8338a906b41a16b2421437b0e7f6ce944f8 Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Thu, 26 Jul 2018 20:51:37 +0800 Subject: [PATCH] =?UTF-8?q?[+]=20grp=20group=20remove=20=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E5=AD=90=E6=9D=83=E9=99=90=E7=BB=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../permissions/commands/CommandGroups.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/main/java/cc/moecraft/icq/plugins/permissions/commands/CommandGroups.java b/src/main/java/cc/moecraft/icq/plugins/permissions/commands/CommandGroups.java index a0a7b00..ab04fff 100644 --- a/src/main/java/cc/moecraft/icq/plugins/permissions/commands/CommandGroups.java +++ b/src/main/java/cc/moecraft/icq/plugins/permissions/commands/CommandGroups.java @@ -160,6 +160,21 @@ else if (args.get(0).equals("group")) return "无法添加继承, 权限组" + newGroup.getGroupName() + "已存在"; } } + else if (args.get(1).equals("remove")) + { + if (group.getContainings().contains(newGroup)) + { + group.getContainings().remove(newGroup); + + Main.getDatabase().setGroup(group); + + return "已移除权限组继承: " + newGroup.getGroupName(); + } + else + { + return "无法移除继承, 权限组" + newGroup.getGroupName() + "已存在"; + } + } } } else