summaryrefslogtreecommitdiffstats
path: root/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java
diff options
context:
space:
mode:
Diffstat (limited to 'EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java')
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java
index d8f5418ed..c0ed77adc 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java
@@ -489,8 +489,10 @@ public class GroupManager extends JavaPlugin {
return false;
}
// PARECE OK
- auxUser.addSubGroup(auxGroup);
- sender.sendMessage(ChatColor.YELLOW + "You added subgroup '" + auxGroup.getName() + "' to player '" + auxUser.getName() + "'.");
+ if (auxUser.addSubGroup(auxGroup))
+ sender.sendMessage(ChatColor.YELLOW + "You added subgroup '" + auxGroup.getName() + "' to player '" + auxUser.getName() + "'.");
+ else
+ sender.sendMessage(ChatColor.RED + "The subgroup '" + auxGroup.getName() + "' is already available to '" + auxUser.getName() + "'.");
targetPlayer = this.getServer().getPlayer(auxUser.getName());
if (targetPlayer != null)