Switch to Entity.sendSystemMessage for chat output
All checks were successful
continuous-integration/drone/push Build is passing

displayClientMessage(Component, boolean) was removed from LocalPlayer
in 26.2. sendSystemMessage(Component) is inherited from Entity, has
been part of Mojang's public API since 1.19, and LocalPlayer overrides
it to route the message into the local chat hud, which is exactly the
behaviour we want.
This commit is contained in:
2026-06-21 16:10:40 +06:00
parent 0e6377fce1
commit b3f24d9828

View File

@@ -113,7 +113,7 @@ public final class ClientIrcMod implements ClientModInitializer {
} }
client.execute(() -> { client.execute(() -> {
if (client.player != null) { if (client.player != null) {
client.player.displayClientMessage(text, false); client.player.sendSystemMessage(text);
} else { } else {
LOGGER.info(text.getString()); LOGGER.info(text.getString());
} }