diff --git a/src/main/java/land/chipmunk/chayapak/chomens_bot/chatParsers/CreayunChatParser.java b/src/main/java/land/chipmunk/chayapak/chomens_bot/chatParsers/CreayunChatParser.java index afae7e8..70691e4 100644 --- a/src/main/java/land/chipmunk/chayapak/chomens_bot/chatParsers/CreayunChatParser.java +++ b/src/main/java/land/chipmunk/chayapak/chomens_bot/chatParsers/CreayunChatParser.java @@ -36,7 +36,7 @@ public class CreayunChatParser implements ChatParser { final String contents = matcher.group(2); MutablePlayerListEntry sender = bot.players().getEntry(displayName); - if (sender == null) sender = new MutablePlayerListEntry(new GameProfile(new UUID(0L, 0L), null), GameMode.SURVIVAL, 0, Component.text(displayName), 0L, null, new byte[0], true); + if (sender == null) sender = new MutablePlayerListEntry(new GameProfile(new UUID(0L, 0L), displayName), GameMode.SURVIVAL, 0, Component.text(displayName), 0L, null, new byte[0], true); return new PlayerMessage(sender, Component.text(displayName), Component.text(contents)); } diff --git a/src/main/java/land/chipmunk/chayapak/chomens_bot/commands/NetMessageCommand.java b/src/main/java/land/chipmunk/chayapak/chomens_bot/commands/NetMessageCommand.java index f829859..d021c61 100644 --- a/src/main/java/land/chipmunk/chayapak/chomens_bot/commands/NetMessageCommand.java +++ b/src/main/java/land/chipmunk/chayapak/chomens_bot/commands/NetMessageCommand.java @@ -63,8 +63,9 @@ public class NetMessageCommand implements Command { Component.text(String.join(" ", args)).color(NamedTextColor.GRAY) ).color(NamedTextColor.DARK_GRAY); - for (Bot allBot : bots) { - allBot.chat().tellraw(component); + for (Bot eachBot : bots) { + if (!eachBot.loggedIn()) continue; + eachBot.chat().tellraw(component); } return null;