3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-11-17 05:20:14 +01:00

Override correct sendMessage method (#698)

Dieser Commit ist enthalten in:
Robin 2022-04-20 04:36:25 +02:00 committet von GitHub
Ursprung acc407a6d5
Commit 5ee96606f6
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -27,6 +27,8 @@ import com.velocitypowered.proxy.VelocityServer;
import com.velocitypowered.proxy.util.ClosestLocaleMatcher; import com.velocitypowered.proxy.util.ClosestLocaleMatcher;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
import net.kyori.adventure.audience.MessageType;
import net.kyori.adventure.identity.Identity; import net.kyori.adventure.identity.Identity;
import net.kyori.adventure.permission.PermissionChecker; import net.kyori.adventure.permission.PermissionChecker;
import net.kyori.adventure.platform.facet.FacetPointers; import net.kyori.adventure.platform.facet.FacetPointers;
@ -65,7 +67,7 @@ public final class VelocityConsole extends SimpleTerminalConsole implements Cons
} }
@Override @Override
public void sendMessage(@NonNull Identity identity, @NonNull Component message) { public void sendMessage(@NonNull Identity identity, @NonNull Component message, @NonNull MessageType messageType) {
Component translated = GlobalTranslator.render(message, ClosestLocaleMatcher.INSTANCE Component translated = GlobalTranslator.render(message, ClosestLocaleMatcher.INSTANCE
.lookupClosest(Locale.getDefault())); .lookupClosest(Locale.getDefault()));
logger.info(LegacyComponentSerializer.legacySection().serialize(translated)); logger.info(LegacyComponentSerializer.legacySection().serialize(translated));