Fix empty translations being sent to Console (#5737)
This commit is contained in:
parent
2cb0af0ca4
commit
8cfe680abc
|
@ -36,7 +36,9 @@ public class CommandSource {
|
|||
}
|
||||
|
||||
final String translation = tlLiteral(tlKey, args);
|
||||
sendComponent(AdventureUtil.miniMessage().deserialize(translation));
|
||||
if (!translation.isEmpty()) {
|
||||
sendComponent(AdventureUtil.miniMessage().deserialize(translation));
|
||||
}
|
||||
}
|
||||
|
||||
public String tl(final String tlKey, final Object... args) {
|
||||
|
|
|
@ -69,6 +69,9 @@ public final class Console implements IMessageRecipient {
|
|||
@Override
|
||||
public void sendTl(String tlKey, Object... args) {
|
||||
final String translation = tlLiteral(tlKey, args);
|
||||
if (translation.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
final Audience consoleAudience = ((Essentials) ess).getBukkitAudience().sender(getCommandSender());
|
||||
final Component component = AdventureUtil.miniMessage()
|
||||
|
|
Loading…
Reference in New Issue