Fix chat message api using overlay

This commit is contained in:
Nassim Jahnke 2022-07-28 00:38:37 +02:00
parent d1727177ba
commit 8e886a3c0a

View file

@ -2732,7 +2732,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ public void sendMessage(final net.kyori.adventure.identity.Identity identity, final net.kyori.adventure.text.Component message, final net.kyori.adventure.audience.MessageType type) {
+ if (getHandle().connection == null) return;
+ final net.minecraft.core.Registry<net.minecraft.network.chat.ChatType> chatTypeRegistry = this.getHandle().level.registryAccess().registryOrThrow(net.minecraft.core.Registry.CHAT_TYPE_REGISTRY);
+ this.getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundSystemChatPacket(message, type == net.kyori.adventure.audience.MessageType.SYSTEM));
+ this.getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundSystemChatPacket(message, false));
+ }
+
+ @Override