Implemented a group limit. Limit can be set in the config.

This commit is contained in:
Jonathan Devine
2012-08-11 20:09:44 +01:00
parent b7bd983a3b
commit 8c091ce1f4

View File

@@ -38,8 +38,9 @@ public class CreateCommand extends PlayerCommand {
}
return true;
}
if(groupManager.getPlayerGroupsAmount(senderName) >= 60){
sendMessage(sender, ChatColor.RED, "You already have too many groups. 60 is the limit. Try deleting one first");
int groupsAllowed = Citadel.getConfigManager().getGroupsAllowed();
if(groupManager.getPlayerGroupsAmount(senderName) >= groupsAllowed){
sendMessage(sender, ChatColor.RED, "You already have too many groups. %s is the limit. Try deleting one first", groupsAllowed);
return true;
}
Faction group = new Faction(groupName, senderName);