Interface ServerMessageEvents.GameMessage
- Enclosing class:
ServerMessageEvents
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onGameMessage
(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.
-
Method Details
-
onGameMessage
void onGameMessage(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. Is not called when game messages are blocked.- Parameters:
message
- the broadcast message; usemessage.raw().getContent()
to get the texttypeKey
- the message type
-