attempting to make good codes at 3 in the morning isnt very bright

This commit is contained in:
ZeroEpoch1969 2018-06-02 13:08:35 -07:00
parent 7026423e8e
commit c835d38b7c
No known key found for this signature in database
GPG Key ID: E0AAB104FB9F8FDF
2 changed files with 5 additions and 4 deletions

View File

@ -7,6 +7,8 @@ import me.totalfreedom.totalfreedommod.rank.Displayable;
import me.totalfreedom.totalfreedommod.util.FLog; import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.FSync; import me.totalfreedom.totalfreedommod.util.FSync;
import static me.totalfreedom.totalfreedommod.util.FUtil.playerMsg; import static me.totalfreedom.totalfreedommod.util.FUtil.playerMsg;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.Sound; import org.bukkit.Sound;
import org.bukkit.SoundCategory; import org.bukkit.SoundCategory;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
@ -137,10 +139,9 @@ public class ChatManager extends FreedomService
Admin admin = plugin.al.getAdmin(player); Admin admin = plugin.al.getAdmin(player);
if (!Strings.isNullOrEmpty(admin.getAcFormat())) if (!Strings.isNullOrEmpty(admin.getAcFormat()))
{ {
String coloredTag = getColoredTag(admin, display);
String format = admin.getAcFormat(); String format = admin.getAcFormat();
String msg = format.replace("%name%", sender.getName()).replace("%tag%", coloredTag).replace("%message%", message); String msg = format.replace("%name%", sender.getName()).replace("%rank%", display.getAbbr()).replace("%rankcolor%", display.getColor().toString()).replace("%msg%", message);
player.sendMessage(msg); player.sendMessage(FUtil.colorize(msg));
} }
else else
{ {

View File

@ -186,7 +186,7 @@ public class Command_myadmin extends FreedomCommand
plugin.al.save(); plugin.al.save();
plugin.al.updateTables(); plugin.al.updateTables();
msg("Set admin chat format to \"" + format + "\".", ChatColor.GRAY); msg("Set admin chat format to \"" + format + "\".", ChatColor.GRAY);
String example = format.replace("%name%", "ExampleAdmin").replace("%rank%", "STA").replace("%msg%", "The quick brown fox jumps over the lazy dog."); 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)); msg(ChatColor.GRAY + "Example: " + FUtil.colorize(example));
return true; return true;
} }