Switch to Entity.sendSystemMessage for chat output
All checks were successful
continuous-integration/drone/push Build is passing
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:
@@ -113,7 +113,7 @@ public final class ClientIrcMod implements ClientModInitializer {
|
||||
}
|
||||
client.execute(() -> {
|
||||
if (client.player != null) {
|
||||
client.player.displayClientMessage(text, false);
|
||||
client.player.sendSystemMessage(text);
|
||||
} else {
|
||||
LOGGER.info(text.getString());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user