Merge branch '2.x' into ajmaacc

This commit is contained in:
AjMac 2024-03-27 20:38:40 -04:00 committed by GitHub
commit 3f9c22b5fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 2 deletions

View File

@ -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) {

View File

@ -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()

View File

@ -1200,7 +1200,7 @@ public class Essentials extends JavaPlugin implements net.ess3.api.IEssentials {
@Override
public void broadcastTl(final String tlKey, final Object... args) {
broadcastTl(null, null, true, tlKey, args);
broadcastTl(null, null, false, tlKey, args);
}
@Override