类 ClientChatEvent

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

public class ClientChatEvent extends net.minecraftforge.eventbus.api.Event
Fired when the client is about to send a chat message to the server.

This event is cancellable, and does not have a result. If the event is cancelled, the chat message will not be sent to the server.

This event is fired on the main Forge event bus, only on the logical client.

  • 嵌套类概要

    从类继承的嵌套类/接口 net.minecraftforge.eventbus.api.Event

    net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
  • 字段概要

    字段
    修饰符和类型
    字段
    说明
    private String
     
    private final String
     
  • 构造器概要

    构造器
    构造器
    说明
     
  • 方法概要

    修饰符和类型
    方法
    说明
    返回 the message that will be sent to the server, if the event is not cancelled. This can be changed by mods。
    返回 the original message that was to be sent to the server. This cannot be changed by mods。
    void
    setMessage(String message)
    Sets the new message to be sent to the server, if the event is not cancelled.

    从类继承的方法 net.minecraftforge.eventbus.api.Event

    getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 字段详细资料

    • message

      private String message
    • originalMessage

      private final String originalMessage
  • 构造器详细资料

    • ClientChatEvent

      @Internal public ClientChatEvent(String message)
  • 方法详细资料

    • getMessage

      public String getMessage()
      返回 the message that will be sent to the server, if the event is not cancelled. This can be changed by mods。
      返回:
      the message that will be sent to the server, if the event is not cancelled. This can be changed by mods
    • setMessage

      public void setMessage(String message)
      Sets the new message to be sent to the server, if the event is not cancelled.
      参数:
      message - the new message to be sent
    • getOriginalMessage

      public String getOriginalMessage()
      返回 the original message that was to be sent to the server. This cannot be changed by mods。
      返回:
      the original message that was to be sent to the server. This cannot be changed by mods