mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
Switch to Allman Formatting
This commit is contained in:
parent
b03870c0aa
commit
b3b68ebd13
@ -159,14 +159,17 @@ public class ChatManager extends FreedomService
|
||||
FLog.info("[ADMIN] " + sender.getName() + " " + display.getTag() + ": " + message, true);
|
||||
plugin.dc.messageAdminChatChannel(sender.getName() + " \u00BB " + message);
|
||||
|
||||
server.getOnlinePlayers().stream().filter(player -> plugin.al.isAdmin(player)).forEach(player -> {
|
||||
server.getOnlinePlayers().stream().filter(player -> plugin.al.isAdmin(player)).forEach(player ->
|
||||
{
|
||||
Admin admin = plugin.al.getAdmin(player);
|
||||
if (!Strings.isNullOrEmpty(admin.getAcFormat())) {
|
||||
String format = admin.getAcFormat();
|
||||
ChatColor color = getColor(display);
|
||||
String msg = format.replace("%name%", sender.getName()).replace("%rank%", display.getAbbr()).replace("%rankcolor%", color.toString()).replace("%msg%", message);
|
||||
player.sendMessage(FUtil.colorize(msg));
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
player.sendMessage("[" + ChatColor.AQUA + "ADMIN" + ChatColor.WHITE + "] " + ChatColor.DARK_RED + sender.getName() + ChatColor.DARK_GRAY + " [" + getColoredTag(display) + ChatColor.DARK_GRAY + "]" + ChatColor.WHITE + ": " + ChatColor.GOLD + FUtil.colorize(message));
|
||||
}
|
||||
});
|
||||
|
@ -56,10 +56,12 @@ public class DiscordToAdminChatListener extends ListenerAdapter
|
||||
|
||||
FLog.info(message.toString());
|
||||
|
||||
Bukkit.getOnlinePlayers().stream().filter(player -> TotalFreedomMod.getPlugin().al.isAdmin(player)).forEach(player -> {
|
||||
Bukkit.getOnlinePlayers().stream().filter(player -> TotalFreedomMod.getPlugin().al.isAdmin(player)).forEach(player ->
|
||||
{
|
||||
Admin admin = TotalFreedomMod.getPlugin().al.getAdmin(player);
|
||||
String format = admin.getAcFormat();
|
||||
if (!Strings.isNullOrEmpty(format)) {
|
||||
if (!Strings.isNullOrEmpty(format))
|
||||
{
|
||||
Displayable display = TotalFreedomMod.getPlugin().rm.getDisplay(player);
|
||||
net.md_5.bungee.api.ChatColor color = getColor(display);
|
||||
String m = format.replace("%name%", member.getEffectiveName())
|
||||
@ -67,7 +69,9 @@ public class DiscordToAdminChatListener extends ListenerAdapter
|
||||
.replace("%rankcolor%", color.toString())
|
||||
.replace("%msg%", FUtil.colorize(msg.getContentDisplay()));
|
||||
builder.append(FUtil.colorize(m));
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
String m = ChatColor.DARK_RED + member.getEffectiveName() + " "
|
||||
+ ChatColor.DARK_GRAY + tag + ChatColor.DARK_GRAY
|
||||
+ ChatColor.WHITE + ": " + ChatColor.GOLD + FUtil.colorize(msg.getContentDisplay());
|
||||
|
Loading…
Reference in New Issue
Block a user