actually fix stuff mabe

This commit is contained in:
Chayapak 2023-05-11 08:45:39 +07:00
parent fbd8151093
commit 7c4165ef4e
2 changed files with 4 additions and 3 deletions

View file

@ -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));
}

View file

@ -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;