add thread name to logger for some reaosn lol
This commit is contained in:
@@ -63,9 +63,10 @@ public class LoggerPlugin extends ChatPlugin.Listener {
|
||||
LocalDateTime dateTime = LocalDateTime.now();
|
||||
|
||||
final Component message = Component.translatable(
|
||||
"[%s %s] [%s] %s",
|
||||
"[%s %s] [%s] [%s] %s",
|
||||
Component.text(dateTime.format(dateTimeFormatter)).color(NamedTextColor.GRAY),
|
||||
prefix,
|
||||
Component.text(Thread.currentThread().getName()).color(NamedTextColor.GRAY),
|
||||
Component.text(bot.options.serverName).color(NamedTextColor.GRAY),
|
||||
Component.text(_message).color(NamedTextColor.WHITE)
|
||||
).color(NamedTextColor.DARK_GRAY);
|
||||
|
||||
@@ -89,7 +89,7 @@ public class VoiceChatPlugin extends Bot.Listener {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
new Thread(() -> {
|
||||
final Thread thread = new Thread(() -> {
|
||||
sendToServer(new NetworkMessage(new AuthenticatePacket(initializationData.playerUUID, initializationData.secret)));
|
||||
|
||||
while (running) {
|
||||
@@ -106,7 +106,10 @@ public class VoiceChatPlugin extends Bot.Listener {
|
||||
else break; // is this neccessary?
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
});
|
||||
|
||||
thread.setName("Simple Voice Chat Thread");
|
||||
thread.start();
|
||||
} else if (_packet.getChannel().equals("voicechat:add_group")) {
|
||||
final byte[] bytes = _packet.getData();
|
||||
final FriendlyByteBuf buf = new FriendlyByteBuf(Unpooled.wrappedBuffer(bytes));
|
||||
|
||||
Reference in New Issue
Block a user