Package org.geysermc.geyser.text
Record Class ChatTypeEntry
java.lang.Object
java.lang.Record
org.geysermc.geyser.text.ChatTypeEntry
public record ChatTypeEntry(@Nonnull org.cloudburstmc.protocol.bedrock.packet.TextPacket.Type bedrockChatType, @Nullable TextDecoration textDecoration)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionChatTypeEntry(org.cloudburstmc.protocol.bedrock.packet.TextPacket.Type bedrockChatType, TextDecoration textDecoration)Creates an instance of aChatTypeEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidapplyDefaults(it.unimi.dsi.fastutil.ints.Int2ObjectMap<ChatTypeEntry> chatTypes)Apply defaults to a map so it isn't empty in the event a chat message is sent before the login packet.org.cloudburstmc.protocol.bedrock.packet.TextPacket.TypeReturns the value of thebedrockChatTyperecord component.booleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.Returns the value of thetextDecorationrecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
ChatTypeEntry
public ChatTypeEntry(@Nonnull org.cloudburstmc.protocol.bedrock.packet.TextPacket.Type bedrockChatType, @Nullable TextDecoration textDecoration)Creates an instance of aChatTypeEntryrecord class.- Parameters:
bedrockChatType- the value for thebedrockChatTyperecord componenttextDecoration- the value for thetextDecorationrecord component
-
-
Method Details
-
applyDefaults
public static void applyDefaults(it.unimi.dsi.fastutil.ints.Int2ObjectMap<ChatTypeEntry> chatTypes)Apply defaults to a map so it isn't empty in the event a chat message is sent before the login packet. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
bedrockChatType
@Nonnull public org.cloudburstmc.protocol.bedrock.packet.TextPacket.Type bedrockChatType()Returns the value of thebedrockChatTyperecord component.- Returns:
- the value of the
bedrockChatTyperecord component
-
textDecoration
Returns the value of thetextDecorationrecord component.- Returns:
- the value of the
textDecorationrecord component
-