类 SystemMessageReceivedEvent

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

public class SystemMessageReceivedEvent extends net.minecraftforge.eventbus.api.Event
Fired when a system message is received on the client. This can be used for filtering and detecting messages with specific words or phrases, and suppressing them.

If the event is cancelled, the message is not displayed in the chat message window.

  • 嵌套类概要

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

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

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

    构造器
    构造器
    说明
    SystemMessageReceivedEvent(Component message, boolean overlay)
     
  • 方法概要

    修饰符和类型
    方法
    说明
    返回 the message that will be displayed in the chat message window, if the event is not cancelled。
    boolean
    返回 whether the message goes to the overlay。
    void
    Sets the new message to be displayed in the chat message window, 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 Component message
    • overlay

      private final boolean overlay
  • 构造器详细资料

    • SystemMessageReceivedEvent

      @Internal public SystemMessageReceivedEvent(Component message, boolean overlay)
  • 方法详细资料

    • isOverlay

      public boolean isOverlay()
      返回 whether the message goes to the overlay。
      返回:
      whether the message goes to the overlay
    • getMessage

      public Component getMessage()
      返回 the message that will be displayed in the chat message window, if the event is not cancelled。
      返回:
      the message that will be displayed in the chat message window, if the event is not cancelled
    • setMessage

      public void setMessage(Component message)
      Sets the new message to be displayed in the chat message window, if the event is not cancelled.
      参数:
      message - the new message to be displayed