mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-22 08:47:39 +00:00
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.
This commit is contained in:
parent
24dfac65b2
commit
0fa3d0e8d1
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user