Record Class Chat
java.lang.Object
java.lang.Record
net.flectone.pulse.module.message.chat.model.Chat
- Record Components:
name- the chat name, or null when no chat matchedconfig- the chat settings, or nullpermission- the chat permissions, or null
public record Chat(@Nullable String name, @Nullable Message.Chat.Type config, @Nullable Permission.Message.Chat.Type permission)
extends Record
One configured chat, together with the settings and permissions attached to it.
-
Constructor Summary
ConstructorsConstructorDescriptionChat(@Nullable String name, @Nullable Message.Chat.Type config, @Nullable Permission.Message.Chat.Type permission) Creates an instance of aChatrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable Message.Chat.Typeconfig()Returns the value of theconfigrecord component.cooldown()The chat's cooldown with the permission that bypasses it.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable Stringname()Returns the value of thenamerecord component.@Nullable Permission.Message.Chat.TypeReturns the value of thepermissionrecord component.sound()The chat's sound with the permission needed to hear it.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Chat
public Chat(@Nullable String name, @Nullable Message.Chat.Type config, @Nullable Permission.Message.Chat.Type permission) Creates an instance of aChatrecord class.- Parameters:
name- the value for thenamerecord componentconfig- the value for theconfigrecord componentpermission- the value for thepermissionrecord component
-
-
Method Details
-
cooldown
The chat's cooldown with the permission that bypasses it.- Returns:
- the cooldown and its bypass permission
-
sound
The chat's sound with the permission needed to hear it.- Returns:
- the sound and its permission
-
toString
-
hashCode
-
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). -
name
-
config
-
permission
Returns the value of thepermissionrecord component.- Returns:
- the value of the
permissionrecord component
-