public interface ChatType
A type of chat.
- Since:
- 4.12.0
- Since Minecraft:
- 1.19
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ChatTypeA chat message from a player.static final ChatTypeA message sent as a result of using the/mecommand.static final ChatTypeA message received as a result of using the/msgcommand.static final ChatTypeA message sent as a result of using the/msgcommand.static final ChatTypeA message send as a result of using the/saycommand.static final ChatTypeA message received as a result of using the/teammsgcommand.static final ChatTypeA message sent as a result of using the/teammsgcommand. -
Method Summary
Modifier and TypeMethodDescriptiondefault ChatType.Boundbind(ComponentLike name) Creates a bound chat type with a nameComponent.default ChatType.Boundbind(ComponentLike name, @Nullable ComponentLike target) Creates a bound chat type with a name and targetComponent.static ChatTypeCreates a new chat type with a given key.@Nullable Keykey()Gets the key associated with this chat type.
-
Field Details
-
CHAT
A chat message from a player.- Since:
- 4.12.0
- Since Minecraft:
- 1.19
-
SAY_COMMAND
A message send as a result of using the/saycommand.- Since:
- 4.12.0
- Since Minecraft:
- 1.19
-
MSG_COMMAND_INCOMING
A message received as a result of using the/msgcommand.- Since:
- 4.12.0
- Since Minecraft:
- 1.19
-
MSG_COMMAND_OUTGOING
A message sent as a result of using the/msgcommand.- Since:
- 4.12.0
- Since Minecraft:
- 1.19
-
TEAM_MSG_COMMAND_INCOMING
A message received as a result of using the/teammsgcommand.- Since:
- 4.12.0
- Since Minecraft:
- 1.19
-
TEAM_MSG_COMMAND_OUTGOING
A message sent as a result of using the/teammsgcommand.- Since:
- 4.12.0
- Since Minecraft:
- 1.19
-
EMOTE_COMMAND
A message sent as a result of using the/mecommand.- Since:
- 4.12.0
- Since Minecraft:
- 1.19
-
-
Method Details
-
chatType
Creates a new chat type with a given key.- Parameters:
key- the key- Returns:
- the chat type
- Since:
- 4.12.0
-
bind
Creates a bound chat type with a nameComponent.- Parameters:
name- the name component- Returns:
- a new bound chat type
- Since:
- 4.12.0
- Since Minecraft:
- 1.19
-
bind
@Contract(value="_, _ -> new", pure=true) default ChatType.Bound bind(ComponentLike name, @Nullable ComponentLike target) Creates a bound chat type with a name and targetComponent.- Parameters:
name- the name componenttarget- the optional target component- Returns:
- a new bound chat type
- Since:
- 4.12.0
- Since Minecraft:
- 1.19
-
key
@Nullable Key key()Gets the key associated with this chat type.In some circumstances, such as an inlined chat type, there may not be a key. In these cases, this method will return
null.- Returns:
- the key, if possible
- Since:
- 4.12.0
-