mirror of
https://github.com/System-End/Discord-MC-Chat.git
synced 2026-04-19 20:55:13 +00:00
send separate chat messages for each line in reply
This commit is contained in:
parent
ce23c5e006
commit
26da430bb9
1 changed files with 4 additions and 1 deletions
|
|
@ -56,7 +56,10 @@ public class MinecraftCommands {
|
|||
@Override
|
||||
public void reply(String message) {
|
||||
// TODO Ephemeral if false, visible to all admin if true
|
||||
source.sendSuccess(() -> Component.literal(message), false);
|
||||
// For each line in the message, send a separate chat message
|
||||
for (String line : message.split("\n")) {
|
||||
source.sendSuccess(() -> Component.literal(line), false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue