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 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 a Settings record class.
      Parameters:
      serverName - the value for the serverName record component
      globalDisabled - the value for the globalDisabled record component
      worldDisabled - the value for the worldDisabled record component
      disabledReason - the value for the disabledReason record component
      welcomeEnabled - the value for the welcomeEnabled record component
      welcomeTitle - the value for the welcomeTitle record component
      welcomeBody - the value for the welcomeBody record component
      welcomeKind - the value for the welcomeKind record component
      welcomeDurationMs - the value for the welcomeDurationMs record component
      kickEnabled - the value for the kickEnabled record component
      kickMods - the value for the kickMods record component
      kickMessage - the value for the kickMessage record component
      ratePerSecond - the value for the ratePerSecond record component
      rateBurst - the value for the rateBurst record component
      debug - the value for the debug record component
  • Method Details

    • from

      public static Settings from(org.bukkit.configuration.file.FileConfiguration c, Logger log)
    • disabledFor

      public Set<String> disabledFor(String world)
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • serverName

      public String serverName()
      Returns the value of the serverName record component.
      Returns:
      the value of the serverName record component
    • globalDisabled

      public Set<String> globalDisabled()
      Returns the value of the globalDisabled record component.
      Returns:
      the value of the globalDisabled record component
    • worldDisabled

      public Map<String, Set<String>> worldDisabled()
      Returns the value of the worldDisabled record component.
      Returns:
      the value of the worldDisabled record component
    • disabledReason

      public String disabledReason()
      Returns the value of the disabledReason record component.
      Returns:
      the value of the disabledReason record component
    • welcomeEnabled

      public boolean welcomeEnabled()
      Returns the value of the welcomeEnabled record component.
      Returns:
      the value of the welcomeEnabled record component
    • welcomeTitle

      public String welcomeTitle()
      Returns the value of the welcomeTitle record component.
      Returns:
      the value of the welcomeTitle record component
    • welcomeBody

      public String welcomeBody()
      Returns the value of the welcomeBody record component.
      Returns:
      the value of the welcomeBody record component
    • welcomeKind

      public NotificationKind welcomeKind()
      Returns the value of the welcomeKind record component.
      Returns:
      the value of the welcomeKind record component
    • welcomeDurationMs

      public long welcomeDurationMs()
      Returns the value of the welcomeDurationMs record component.
      Returns:
      the value of the welcomeDurationMs record component
    • kickEnabled

      public boolean kickEnabled()
      Returns the value of the kickEnabled record component.
      Returns:
      the value of the kickEnabled record component
    • kickMods

      public Set<String> kickMods()
      Returns the value of the kickMods record component.
      Returns:
      the value of the kickMods record component
    • kickMessage

      public String kickMessage()
      Returns the value of the kickMessage record component.
      Returns:
      the value of the kickMessage record component
    • ratePerSecond

      public double ratePerSecond()
      Returns the value of the ratePerSecond record component.
      Returns:
      the value of the ratePerSecond record component
    • rateBurst

      public double rateBurst()
      Returns the value of the rateBurst record component.
      Returns:
      the value of the rateBurst record component
    • debug

      public boolean debug()
      Returns the value of the debug record component.
      Returns:
      the value of the debug record component