Skip to content
Snippets Groups Projects
Commit 0fa3d0e8 authored by AnimeGitB's avatar AnimeGitB Committed by Melledy
Browse files

Improve message formatting to clients

Replaces tab indents with an extra linebreak.
Also adds / to the start of command usage.
Neither of these changes affect messages to the server console log.
parent 24dfac65
Branches
Tags
No related merge requests found
......@@ -28,7 +28,7 @@ public interface CommandHandler {
if (player == null) {
Grasscutter.getLogger().info(event.getMessage());
} else {
player.dropMessage(event.getMessage());
player.dropMessage(event.getMessage().replace("\n\t", "\n\n"));
}
}
......@@ -44,6 +44,9 @@ public interface CommandHandler {
if (alias.length() < command.length())
command = alias;
}
if (player != null) {
command = "/" + command;
}
String target = switch (annotation.targetRequirement()) {
case NONE -> "";
case OFFLINE -> "@<UID> "; // TODO: make translation keys for offline and online players
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment