mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-06-11 21:43:54 +00:00
Merge branch 'TFM1.12-Alpha' of https://github.com/TFPatches/TotalFreedomMod into TFM1.12-Alpha
This commit is contained in:
@ -107,7 +107,7 @@ public class Command_list extends FreedomCommand
|
||||
}
|
||||
|
||||
final Displayable display = plugin.rm.getDisplay(p);
|
||||
if (!senderIsConsole && plugin.al.isAdmin(playerSender) && plugin.al.getAdmin(playerSender).getOldAdminMode())
|
||||
if (!senderIsConsole && plugin.al.isAdmin(playerSender) && plugin.al.getAdmin(playerSender).getOldTags())
|
||||
{
|
||||
n.add(getOldPrefix(display) + p.getName());
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@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>")
|
||||
@CommandParameters(description = "Manage my admin entry", usage = "/<command> [-o <admin>] <clearips | clearip <ip> | setlogin <message> | clearlogin | settag <tag> | cleartag | setacformat <format> | clearacformat> | oldtags>")
|
||||
public class Command_myadmin extends FreedomCommand
|
||||
{
|
||||
|
||||
@ -174,12 +174,38 @@ public class Command_myadmin extends FreedomCommand
|
||||
case "cleartag":
|
||||
{
|
||||
FUtil.adminAction(sender.getName(), "Clearing personal default tag" + (init == null ? "" : " for " + targetPlayer.getName()), false);
|
||||
String tag = StringUtils.join(args, " ", 1, args.length);
|
||||
target.setTag(null);
|
||||
plugin.al.save();
|
||||
plugin.al.updateTables();
|
||||
return true;
|
||||
}
|
||||
case "setacformat":
|
||||
{
|
||||
String format = StringUtils.join(args, " ", 1, args.length);
|
||||
target.setAcFormat(format);
|
||||
plugin.al.save();
|
||||
plugin.al.updateTables();
|
||||
msg("Set admin chat format to \"" + format + "\".", ChatColor.GRAY);
|
||||
String example = format.replace("%name%", "ExampleAdmin").replace("%rank%", Rank.TELNET_ADMIN.getAbbr()).replace("%rankcolor%", Rank.TELNET_ADMIN.getColor().toString()).replace("%msg%", "The quick brown fox jumps over the lazy dog.");
|
||||
msg(ChatColor.GRAY + "Example: " + FUtil.colorize(example));
|
||||
return true;
|
||||
}
|
||||
case "clearacformat":
|
||||
{
|
||||
target.setAcFormat(null);
|
||||
plugin.al.save();
|
||||
plugin.al.updateTables();
|
||||
msg("Cleared admin chat format.", ChatColor.GRAY);
|
||||
return true;
|
||||
}
|
||||
case "oldtags":
|
||||
{
|
||||
target.setOldTags(!target.getOldTags());
|
||||
plugin.al.save();
|
||||
plugin.al.updateTables();
|
||||
msg((target.getOldTags() ? "Enabled" : "Disabled") + " old tags.");
|
||||
return true;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
|
@ -1,26 +0,0 @@
|
||||
package me.totalfreedom.totalfreedommod.command;
|
||||
|
||||
import me.totalfreedom.totalfreedommod.admin.Admin;
|
||||
import me.totalfreedom.totalfreedommod.rank.Rank;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.ONLY_IN_GAME)
|
||||
@CommandParameters(description = "Toggle old admin formatting", usage = "/<command>", aliases = "oam")
|
||||
public class Command_oldadminmode extends FreedomCommand
|
||||
{
|
||||
|
||||
@Override
|
||||
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||
{
|
||||
|
||||
Admin admin = plugin.al.getAdmin(playerSender);
|
||||
admin.setOldAdminMode(!admin.getOldAdminMode());
|
||||
plugin.al.save();
|
||||
plugin.al.updateTables();
|
||||
msg("Old admin mode has been " + (admin.getOldAdminMode() ? "enabled." : "disabled."));
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
@ -52,7 +52,7 @@ public class Command_totalfreedommod extends FreedomCommand
|
||||
msg("Running on " + ConfigEntry.SERVER_NAME.getString() + ".", ChatColor.GOLD);
|
||||
msg("Created by Madgeek1450 and Prozza.", ChatColor.GOLD);
|
||||
msg(String.format("Version "
|
||||
+ ChatColor.BLUE + "%s %s.%s " + ChatColor.GOLD + "("
|
||||
+ ChatColor.BLUE + "%s - %s Build %s " + ChatColor.GOLD + "("
|
||||
+ ChatColor.BLUE + "%s" + ChatColor.GOLD + ")",
|
||||
build.codename,
|
||||
build.version,
|
||||
|
Reference in New Issue
Block a user