I think I have a better solution to #109

This commit is contained in:
ZeroEpoch1969
2018-07-30 22:58:50 -07:00
parent b702c1cec5
commit 12f023196a
11 changed files with 132 additions and 123 deletions

View File

@ -13,7 +13,7 @@ import org.bukkit.entity.Player;
import java.util.Arrays;
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
@CommandParameters(description = "Manage my admin entry", usage = "/<command> [-o <admin>] <clearips | clearip <ip> | setlogin <message> | clearlogin | settag <tag> | cleartag | setacformat <format> | clearacformat> | oldtags | logstick>")
@CommandParameters(description = "Manage my admin entry", usage = "/<command> [-o <admin>] <clearips | clearip <ip> | setlogin <message> | clearlogin | setacformat <format> | clearacformat> | oldtags | logstick>")
public class Command_myadmin extends FreedomCommand
{
@ -162,21 +162,13 @@ public class Command_myadmin extends FreedomCommand
case "settag":
{
FUtil.adminAction(sender.getName(), "Setting personal default tag" + (init == null ? "" : " for " + targetPlayer.getName()), false);
String tag = StringUtils.join(args, " ", 1, args.length);
target.setTag(tag);
msg((init == null ? "Your" : targetPlayer.getName() + "'s") + " default tag is now: " + FUtil.colorize(target.getTag()));
plugin.al.save();
plugin.al.updateTables();
msg("Please use /tag set to set your tag.", ChatColor.RED);
return true;
}
case "cleartag":
{
FUtil.adminAction(sender.getName(), "Clearing personal default tag" + (init == null ? "" : " for " + targetPlayer.getName()), false);
target.setTag(null);
plugin.al.save();
plugin.al.updateTables();
msg("Please use /tag off to remove your tag.", ChatColor.RED);
return true;
}
case "setacformat":