Record Class Settings
java.lang.Object
java.lang.Record
net.flick.serverapi.internal.Settings
public record Settings(String serverName, Set<String> globalDisabled, Map<String, Set<String>> worldDisabled, String disabledReason, boolean welcomeEnabled, String welcomeTitle, String welcomeBody, NotificationKind welcomeKind, long welcomeDurationMs, boolean kickEnabled, Set<String> kickMods, String kickMessage, double ratePerSecond, double rateBurst, boolean debug)
extends Record
Parsed config.yml (immutable snapshot; replaced on /flick reload).
-
Constructor Summary
ConstructorsConstructorDescriptionSettings(String serverName, Set<String> globalDisabled, Map<String, Set<String>> worldDisabled, String disabledReason, boolean welcomeEnabled, String welcomeTitle, String welcomeBody, NotificationKind welcomeKind, long welcomeDurationMs, boolean kickEnabled, Set<String> kickMods, String kickMessage, double ratePerSecond, double rateBurst, boolean debug) Creates an instance of aSettingsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleandebug()Returns the value of thedebugrecord component.disabledFor(String world) Returns the value of thedisabledReasonrecord component.final booleanIndicates whether some other object is "equal to" this one.static SettingsReturns the value of theglobalDisabledrecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thekickEnabledrecord component.Returns the value of thekickMessagerecord component.kickMods()Returns the value of thekickModsrecord component.doubleReturns the value of therateBurstrecord component.doubleReturns the value of theratePerSecondrecord component.Returns the value of theserverNamerecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thewelcomeBodyrecord component.longReturns the value of thewelcomeDurationMsrecord component.booleanReturns the value of thewelcomeEnabledrecord component.Returns the value of thewelcomeKindrecord component.Returns the value of thewelcomeTitlerecord component.Returns the value of theworldDisabledrecord component.
-
Constructor Details
-
Settings
public Settings(String serverName, Set<String> globalDisabled, Map<String, Set<String>> worldDisabled, String disabledReason, boolean welcomeEnabled, String welcomeTitle, String welcomeBody, NotificationKind welcomeKind, long welcomeDurationMs, boolean kickEnabled, Set<String> kickMods, String kickMessage, double ratePerSecond, double rateBurst, boolean debug) Creates an instance of aSettingsrecord class.- Parameters:
serverName- the value for theserverNamerecord componentglobalDisabled- the value for theglobalDisabledrecord componentworldDisabled- the value for theworldDisabledrecord componentdisabledReason- the value for thedisabledReasonrecord componentwelcomeEnabled- the value for thewelcomeEnabledrecord componentwelcomeTitle- the value for thewelcomeTitlerecord componentwelcomeBody- the value for thewelcomeBodyrecord componentwelcomeKind- the value for thewelcomeKindrecord componentwelcomeDurationMs- the value for thewelcomeDurationMsrecord componentkickEnabled- the value for thekickEnabledrecord componentkickMods- the value for thekickModsrecord componentkickMessage- the value for thekickMessagerecord componentratePerSecond- the value for theratePerSecondrecord componentrateBurst- the value for therateBurstrecord componentdebug- the value for thedebugrecord component
-
-
Method Details
-
from
-
disabledFor
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
serverName
Returns the value of theserverNamerecord component.- Returns:
- the value of the
serverNamerecord component
-
globalDisabled
-
worldDisabled
-
disabledReason
Returns the value of thedisabledReasonrecord component.- Returns:
- the value of the
disabledReasonrecord component
-
welcomeEnabled
public boolean welcomeEnabled()Returns the value of thewelcomeEnabledrecord component.- Returns:
- the value of the
welcomeEnabledrecord component
-
welcomeTitle
Returns the value of thewelcomeTitlerecord component.- Returns:
- the value of the
welcomeTitlerecord component
-
welcomeBody
Returns the value of thewelcomeBodyrecord component.- Returns:
- the value of the
welcomeBodyrecord component
-
welcomeKind
Returns the value of thewelcomeKindrecord component.- Returns:
- the value of the
welcomeKindrecord component
-
welcomeDurationMs
public long welcomeDurationMs()Returns the value of thewelcomeDurationMsrecord component.- Returns:
- the value of the
welcomeDurationMsrecord component
-
kickEnabled
public boolean kickEnabled()Returns the value of thekickEnabledrecord component.- Returns:
- the value of the
kickEnabledrecord component
-
kickMods
-
kickMessage
Returns the value of thekickMessagerecord component.- Returns:
- the value of the
kickMessagerecord component
-
ratePerSecond
public double ratePerSecond()Returns the value of theratePerSecondrecord component.- Returns:
- the value of the
ratePerSecondrecord component
-
rateBurst
public double rateBurst()Returns the value of therateBurstrecord component.- Returns:
- the value of the
rateBurstrecord component
-
debug
public boolean debug()Returns the value of thedebugrecord component.- Returns:
- the value of the
debugrecord component
-