guild character limit

This commit is contained in:
speedxx 2020-07-14 22:03:25 -04:00
parent a62572111c
commit 2f69d83c7b

View file

@ -53,6 +53,12 @@ public class CreateSubcommand extends Common implements CommandExecutor
return true; return true;
} }
if (name.length() > 64)
{
sender.sendMessage(ChatColor.RED + "Your guild name may not be over 64 characters.");
return true;
}
if (Guild.guildExists(identifier)) if (Guild.guildExists(identifier))
{ {
sender.sendMessage(ChatColor.RED + "A guild with a name similar to yours already exists!"); sender.sendMessage(ChatColor.RED + "A guild with a name similar to yours already exists!");
@ -61,7 +67,7 @@ public class CreateSubcommand extends Common implements CommandExecutor
for (String blacklisted : BLACKLISTED_NAMES) for (String blacklisted : BLACKLISTED_NAMES)
{ {
if (args[0].equalsIgnoreCase(blacklisted)) if (name.equalsIgnoreCase(blacklisted))
{ {
if (!plugin.bridge.isAdmin(player)) if (!plugin.bridge.isAdmin(player))
{ {