This commit is contained in:
speedxx 2020-07-03 13:06:56 -04:00
parent d4ea168816
commit 07308de38d
2 changed files with 8 additions and 6 deletions

View file

@ -45,13 +45,13 @@ public class CreateGuildCommand extends GBase implements CommandExecutor
return true;
}
if (guild.equals(args[0].toLowerCase()))
if (guild.equalsIgnoreCase(args[0]))
{
player.sendMessage(ChatColor.RED + "A guild with that name already exists.");
return true;
}
if (args[0].toLowerCase().length() > 24)
if (args[0].length() > 24)
{
player.sendMessage(ChatColor.RED + "Guild name must not be over 24 characters.");
return true;
@ -76,7 +76,7 @@ public class CreateGuildCommand extends GBase implements CommandExecutor
}
}
GUtil.createGuild(player, args[0].toLowerCase());
GUtil.createGuild(player, args[0]);
Bukkit.broadcastMessage(GUtil.color("&a" + player.getName() + " has created guild &a&l" + args[0]));
player.sendMessage(ChatColor.GREEN + "Successfully created a guild named " + args[0]);
return true;

View file

@ -42,12 +42,14 @@ public class GuildTagCommand extends GBase implements CommandExecutor
String tag = StringUtils.join(args, " ", 1, args.length);
if (args[0].equalsIgnoreCase("set"))
{
if (!tag.toLowerCase().contains(guild))
if (!tag.contains("%tag%"))
{
player.sendMessage(ChatColor.RED + "Your guild tag must contain your guild name in one word.");
player.sendMessage(ChatColor.RED + "Your guild tag must contain your guild name. Use %tag% to specify where you want your tag.");
return true;
}
tag = tag.replace("%tag%", guild);
GUtil.setTag(GUtil.color(tag) + " ", guild);
player.sendMessage(ChatColor.GREEN + "Guild tag set to \"" + GUtil.color(tag) + ChatColor.GREEN + "\"");
return true;
@ -59,7 +61,7 @@ public class GuildTagCommand extends GBase implements CommandExecutor
if (args[0].equalsIgnoreCase("clear"))
{
GUtil.setTag(GUtil.color("&8[&7" + guild + "&8]&r "), guild);
player.sendMessage(ChatColor.GRAY + "Removed your guild's tag.");
player.sendMessage(ChatColor.GREEN + "Removed your guild's tag.");
return true;
}
}