Class 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.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event

        net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ITextComponent getMessage()  
      java.util.UUID getSenderUUID()
      The UUID of the player or entity that sent this message, or null if not known.
      ChatType getType()  
      void setMessage​(ITextComponent message)  
      • Methods inherited from class net.minecraftforge.eventbus.api.Event

        getListenerList, getParentListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • senderUUID

        @Nullable
        private final java.util.UUID senderUUID
    • Constructor Detail

      • ClientChatReceivedEvent

        public ClientChatReceivedEvent​(ChatType type,
                                       ITextComponent message,
                                       @Nullable
                                       java.util.UUID senderUUID)
    • Method Detail

      • getSenderUUID

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