Package net.minestom.server.message
Enum Class ChatMessageType
- All Implemented Interfaces:
Serializable
,Comparable<ChatMessageType>
,Constable
The messages that a player is willing to receive.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
accepts
(@NotNull ChatPosition chatPosition) Checks if this message type is accepting of messages from a given position.static @NotNull ChatMessageType
fromPacketID
(int id) Gets a chat message type from a packet ID.int
Gets the packet ID for this chat message type.static ChatMessageType
Returns the enum constant of this class with the specified name.static ChatMessageType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FULL
The client wants all chat messages. -
SYSTEM
The client only wants messages from commands, or system messages. -
NONE
The client doesn't want any messages.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
accepts
Checks if this message type is accepting of messages from a given position.- Parameters:
chatPosition
- the position- Returns:
- if the message is accepted
-
getPacketID
public int getPacketID()Gets the packet ID for this chat message type.- Returns:
- the packet ID
-
fromPacketID
Gets a chat message type from a packet ID.- Parameters:
id
- the packet ID- Returns:
- the chat message type
-