Interface ClientChatEvent.ClientReceived

Enclosing interface:
ClientChatEvent

@Environment(CLIENT) public static interface ClientChatEvent.ClientReceived
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.world.InteractionResultHolder<net.minecraft.network.chat.Component>
    process(net.minecraft.network.chat.ChatType type, net.minecraft.network.chat.Component message, @Nullable UUID sender)
    Event to intercept the receiving of an chat message.
  • Method Details

    • process

      net.minecraft.world.InteractionResultHolder<net.minecraft.network.chat.Component> process(net.minecraft.network.chat.ChatType type, net.minecraft.network.chat.Component message, @Nullable @Nullable UUID sender)
      Event to intercept the receiving of an chat message. Invoked as soon as the client receives the chat message packet. Equivalent to Forge's ClientChatReceivedEvent event.
      Parameters:
      type - Where was the message emitted from.
      message - The chat message.
      sender - The packet sender. Can be null, but probably is the sending player UUID or Util.NIL_UUID
      Returns:
      Returning InteractionResultHolder.fail(Object) will result in a cancellation of the message and so it is not processed further.