Package net.minecraftforge.client.event
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 onMinecraftForge.EVENT_BUS
.
-
-
Field Summary
Fields Modifier and Type Field Description private ITextComponent
message
private java.util.UUID
senderUUID
private ChatType
type
-
Constructor Summary
Constructors Constructor Description ClientChatReceivedEvent(ChatType type, ITextComponent message, java.util.UUID senderUUID)
-
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)
-
-
-
Field Detail
-
message
private ITextComponent message
-
type
private final ChatType type
-
senderUUID
@Nullable private final java.util.UUID senderUUID
-
-
Constructor Detail
-
ClientChatReceivedEvent
public ClientChatReceivedEvent(ChatType type, ITextComponent message, @Nullable java.util.UUID senderUUID)
-
-
Method Detail
-
getMessage
public ITextComponent getMessage()
-
setMessage
public void setMessage(ITextComponent message)
-
getType
public ChatType getType()
-
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 tonet.minecraft.util.Util#DUMMY_UUID
for system messages.
-
-