Package net.minecraftforge.client.event
Class ClientChatEvent
- java.lang.Object
-
- net.minecraftforge.eventbus.api.Event
-
- net.minecraftforge.client.event.ClientChatEvent
-
public class ClientChatEvent extends net.minecraftforge.eventbus.api.Event
ClientChatEvent is fired whenever the client is about to send a chat message or command to the server.
This event is fired viaForgeEventFactory.onClientSendMessage(String)
, which is executed byGuiScreen#sendChatMessage(String, boolean)
message
contains the message that will be sent to the server. This can be changed by mods.
originalMessage
contains the original message that was going to be sent to the server. This cannot be changed by mods.
This event isCancelable
.
If this event is canceled, the chat message or command is never sent to the server.
This event does not have a result.Event.HasResult
This event is fired on theMinecraftForge.EVENT_BUS
.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
message
private java.lang.String
originalMessage
-
Constructor Summary
Constructors Constructor Description ClientChatEvent(java.lang.String message)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getMessage()
java.lang.String
getOriginalMessage()
void
setMessage(java.lang.String message)
-