diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
index 9898a0e..86bb373 100644
--- a/.idea/codeStyles/Project.xml
+++ b/.idea/codeStyles/Project.xml
@@ -9,6 +9,24 @@
+
+
+
+
diff --git a/TFGuilds.iml b/TFGuilds.iml
index 1fa9431..d0c8bd9 100644
--- a/TFGuilds.iml
+++ b/TFGuilds.iml
@@ -19,7 +19,7 @@
-
+
diff --git a/pom.xml b/pom.xml
index 5889b07..23a21e0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
me.totalfreedom
TFGuilds
- 0.2.15
+ 0.2.16
jar
TFGuilds
@@ -77,7 +77,7 @@
org.spigotmc
spigot-api
- 1.16.3-R0.1-SNAPSHOT
+ 1.16.4-R0.1-SNAPSHOT
provided
diff --git a/src/main/java/me/totalfreedom/tfguilds/command/TagSubcommand.java b/src/main/java/me/totalfreedom/tfguilds/command/TagSubcommand.java
index e594f2a..4d97ec2 100644
--- a/src/main/java/me/totalfreedom/tfguilds/command/TagSubcommand.java
+++ b/src/main/java/me/totalfreedom/tfguilds/command/TagSubcommand.java
@@ -24,7 +24,7 @@ public class TagSubcommand extends Common implements CommandExecutor
if (args.length < 2)
{
- sender.sendMessage(tl(PREFIX + "Proper usage: /g tag | clear>"));
+ sender.sendMessage(tl(PREFIX + "Proper usage: /g tag | clear [guild]>>"));
return true;
}
@@ -73,15 +73,34 @@ public class TagSubcommand extends Common implements CommandExecutor
sender.sendMessage(tl("%p%Your guild tag has been changed to be \"" + GUtil.colorize(tag).replace("%rank%", "Guild Owner") + "%p%\"."));
return true;
}
- return false;
}
if (args[1].equalsIgnoreCase("clear"))
{
+ if (args.length >= 3)
+ {
+ if (!plugin.bridge.isAdmin(sender))
+ {
+ sender.sendMessage(NO_PERMS);
+ return true;
+ }
+
+ Guild g = Guild.getGuild(GUtil.flatten(StringUtils.join(args, " ", 2, args.length)));
+ if (g == null)
+ {
+ sender.sendMessage(ChatColor.RED + "That guild doesn't exist!");
+ return true;
+ }
+
+ g.setTag(null);
+ g.save();
+ sender.sendMessage(tl("%p%Cleared guild tag for " + g.getName() + "."));
+ return true;
+ }
+
guild.setTag(null);
guild.save();
sender.sendMessage(tl("%p%Your guild tag has been cleared."));
- return true;
}
return true;
}