forked from ChomeNS/chomens-bot-java
actually fix stuff mabe
This commit is contained in:
parent
fbd8151093
commit
7c4165ef4e
2 changed files with 4 additions and 3 deletions
src/main/java/land/chipmunk/chayapak/chomens_bot
|
@ -36,7 +36,7 @@ public class CreayunChatParser implements ChatParser {
|
||||||
final String contents = matcher.group(2);
|
final String contents = matcher.group(2);
|
||||||
|
|
||||||
MutablePlayerListEntry sender = bot.players().getEntry(displayName);
|
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));
|
return new PlayerMessage(sender, Component.text(displayName), Component.text(contents));
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,8 +63,9 @@ public class NetMessageCommand implements Command {
|
||||||
Component.text(String.join(" ", args)).color(NamedTextColor.GRAY)
|
Component.text(String.join(" ", args)).color(NamedTextColor.GRAY)
|
||||||
).color(NamedTextColor.DARK_GRAY);
|
).color(NamedTextColor.DARK_GRAY);
|
||||||
|
|
||||||
for (Bot allBot : bots) {
|
for (Bot eachBot : bots) {
|
||||||
allBot.chat().tellraw(component);
|
if (!eachBot.loggedIn()) continue;
|
||||||
|
eachBot.chat().tellraw(component);
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue