make trusted broadcast not confusing in console
This commit is contained in:
parent
14d07a0643
commit
84a984f2f6
1 changed files with 8 additions and 8 deletions
|
@ -26,7 +26,14 @@ public class TrustedPlugin extends PlayersPlugin.Listener {
|
|||
for (Bot bot : bot.bots()) {
|
||||
if (!bot.loggedIn()) continue;
|
||||
|
||||
bot.logger().custom(Component.text("Trusted Broadcast").color(NamedTextColor.AQUA), message);
|
||||
final Component component = Component.translatable(
|
||||
"[%s] [%s] %s",
|
||||
Component.text("ChomeNS Bot").color(NamedTextColor.YELLOW),
|
||||
Component.text(this.bot.options().serverName()).color(NamedTextColor.GRAY),
|
||||
message.color(NamedTextColor.WHITE)
|
||||
).color(NamedTextColor.DARK_GRAY);
|
||||
|
||||
bot.logger().custom(Component.text("Trusted Broadcast").color(NamedTextColor.AQUA), component);
|
||||
|
||||
for (String player : list) {
|
||||
final MutablePlayerListEntry entry = bot.players().getEntry(player);
|
||||
|
@ -35,13 +42,6 @@ public class TrustedPlugin extends PlayersPlugin.Listener {
|
|||
|
||||
if (entry.profile().getId() == exceptTarget) continue;
|
||||
|
||||
final Component component = Component.translatable(
|
||||
"[%s] [%s] %s",
|
||||
Component.text("ChomeNS Bot").color(NamedTextColor.YELLOW),
|
||||
Component.text(this.bot.options().serverName()).color(NamedTextColor.GRAY),
|
||||
message.color(NamedTextColor.WHITE)
|
||||
).color(NamedTextColor.DARK_GRAY);
|
||||
|
||||
bot.chat().tellraw(component, player);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue