mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
attempting to make good codes at 3 in the morning isnt very bright
This commit is contained in:
parent
7026423e8e
commit
c835d38b7c
@ -7,6 +7,8 @@ import me.totalfreedom.totalfreedommod.rank.Displayable;
|
||||
import me.totalfreedom.totalfreedommod.util.FLog;
|
||||
import me.totalfreedom.totalfreedommod.util.FSync;
|
||||
import static me.totalfreedom.totalfreedommod.util.FUtil.playerMsg;
|
||||
|
||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.SoundCategory;
|
||||
import org.bukkit.ChatColor;
|
||||
@ -137,10 +139,9 @@ public class ChatManager extends FreedomService
|
||||
Admin admin = plugin.al.getAdmin(player);
|
||||
if (!Strings.isNullOrEmpty(admin.getAcFormat()))
|
||||
{
|
||||
String coloredTag = getColoredTag(admin, display);
|
||||
String format = admin.getAcFormat();
|
||||
String msg = format.replace("%name%", sender.getName()).replace("%tag%", coloredTag).replace("%message%", message);
|
||||
player.sendMessage(msg);
|
||||
String msg = format.replace("%name%", sender.getName()).replace("%rank%", display.getAbbr()).replace("%rankcolor%", display.getColor().toString()).replace("%msg%", message);
|
||||
player.sendMessage(FUtil.colorize(msg));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -186,7 +186,7 @@ public class Command_myadmin extends FreedomCommand
|
||||
plugin.al.save();
|
||||
plugin.al.updateTables();
|
||||
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));
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user