Class ClientChatReceivedEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.client.event.ClientChatReceivedEvent

public class ClientChatReceivedEvent extends net.minecraftforge.eventbus.api.Event
Fired on the client when a chat message is received.
If this event is cancelled, the message is not displayed in the chat message window.
Fired on MinecraftForge.EVENT_BUS.
  • Field Details

    • message

      private Component message
    • type

      private final ChatType type
    • senderUUID

      @Nullable private final UUID senderUUID
  • Constructor Details

    • ClientChatReceivedEvent

      public ClientChatReceivedEvent(ChatType type, Component message, @Nullable UUID senderUUID)
  • Method Details

    • getMessage

      public Component getMessage()
    • setMessage

      public void setMessage(Component message)
    • getType

      public ChatType getType()
    • getSenderUUID

      @Nullable public UUID getSenderUUID()
      The UUID of the player or entity that sent this message, or null if not known. This will be equal to Util.NIL_UUID for system messages.