Record Class Localization
java.lang.Object
java.lang.Record
net.flectone.pulse.config.Localization
public record Localization(String language, String cooldown, Localization.Time time, Localization.Command command, Localization.Integration integration, Localization.Message message)
extends Record
Configuration for localization in FlectonePulse.
Contains all translatable strings for commands, messages, and integrations.
- Since:
- 1.7.1
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final recordstatic final recordstatic classstatic final recordstatic classstatic final record -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLocalization(String language, String cooldown, Localization.Time time, Localization.Command command, Localization.Integration integration, Localization.Message message) Creates an instance of aLocalizationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()command()Returns the value of thecommandrecord component.cooldown()Returns the value of thecooldownrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theintegrationrecord component.language()Returns the value of thelanguagerecord component.message()Returns the value of themessagerecord component.time()Returns the value of thetimerecord component.final StringtoString()Returns a string representation of this record class.withCommand(Localization.Command command) withCooldown(String cooldown) withIntegration(Localization.Integration integration) withLanguage(String language) withMessage(Localization.Message message) withTime(Localization.Time time)
-
Field Details
-
FOLDER_NAME
- See Also:
-
-
Constructor Details
-
Localization
public Localization(String language, @JsonPropertyDescription(" https://flectone.net/pulse/docs/message") String cooldown, Localization.Time time, @JsonPropertyDescription(" https://flectone.net/pulse/docs/command") Localization.Command command, @JsonPropertyDescription(" https://flectone.net/pulse/docs/integration") Localization.Integration integration, @JsonPropertyDescription(" https://flectone.net/pulse/docs/message") Localization.Message message) Creates an instance of aLocalizationrecord class.- Parameters:
language- the value for thelanguagerecord componentcooldown- the value for thecooldownrecord componenttime- the value for thetimerecord componentcommand- the value for thecommandrecord componentintegration- the value for theintegrationrecord componentmessage- the value for themessagerecord component
-
-
Method Details
-
builder
-
toBuilder
-
withLanguage
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withCooldown
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withTime
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withCommand
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withIntegration
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withMessage
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
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). -
language
Returns the value of thelanguagerecord component.- Returns:
- the value of the
languagerecord component
-
cooldown
Returns the value of thecooldownrecord component.- Returns:
- the value of the
cooldownrecord component
-
time
Returns the value of thetimerecord component.- Returns:
- the value of the
timerecord component
-
command
@JsonPropertyDescription(" https://flectone.net/pulse/docs/command") public Localization.Command command()Returns the value of thecommandrecord component.- Returns:
- the value of the
commandrecord component
-
integration
@JsonPropertyDescription(" https://flectone.net/pulse/docs/integration") public Localization.Integration integration()Returns the value of theintegrationrecord component.- Returns:
- the value of the
integrationrecord component
-
message
@JsonPropertyDescription(" https://flectone.net/pulse/docs/message") public Localization.Message message()Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-