类 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
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明返回 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
setMessage
(Component message) 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
-
字段详细资料
-
message
-
overlay
private final boolean overlay
-
-
构造器详细资料
-
SystemMessageReceivedEvent
-
-
方法详细资料
-
isOverlay
public boolean isOverlay()返回 whether the message goes to the overlay。- 返回:
- whether the message goes to the overlay
-
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
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
-