From 8c091ce1f429ef3b22e19a981c6a13ebcca45887 Mon Sep 17 00:00:00 2001 From: Jonathan Devine Date: Sat, 11 Aug 2012 20:09:44 +0100 Subject: [PATCH] Implemented a group limit. Limit can be set in the config. --- .../untamedears/citadel/command/commands/CreateCommand.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/citadel-paper/src/com/untamedears/citadel/command/commands/CreateCommand.java b/plugins/citadel-paper/src/com/untamedears/citadel/command/commands/CreateCommand.java index b1bfb3c22..04db6cae9 100644 --- a/plugins/citadel-paper/src/com/untamedears/citadel/command/commands/CreateCommand.java +++ b/plugins/citadel-paper/src/com/untamedears/citadel/command/commands/CreateCommand.java @@ -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);