allowGameMessage
boolean allowGameMessage(net.minecraft.text.Text message,
net.minecraft.util.registry.RegistryKey<net.minecraft.network.message.MessageType> typeKey)
Called when the server broadcasts a game message to all players. Game messages
include death messages, join/leave messages, and advancement messages. Returning
false
prevents the message from being broadcast and the
ServerMessageEvents.GAME_MESSAGE
event
from triggering.
- Parameters:
message
- the broadcast message; use message.raw().getContent()
to get the text
typeKey
- the message type
- Returns:
true
if the message should be broadcast, otherwise false