Record Class VisualSettings

java.lang.Object
java.lang.Record
dev.despical.mazeengine.config.VisualSettings

public record VisualSettings(int previewDurationSeconds, int previewMaxSessions, int previewMaxDisplays, int spawnsPerTick, int guideDurationSeconds, int guideLookAhead, String guideBlock, double guideElevation, double guideWidth, double guideThickness, double viewRange, int blockLight, int skyLight, boolean actionBar) extends Record
Stores validated preview, guide, and private-display configuration.

The settings bound session durations, preview slots and display counts, per-tick spawning, guide look-ahead, arrow geometry, lighting, and view range. The guide's block-state string determines its visible material and color.

Reading checks expected types and finite supported ranges before publication. The production block parser resolves visible Bukkit block data; a supplied parser supports isolated validation tests. Active sessions capture their expiry when created, while the visual service can refresh applicable display appearance and guide geometry after reload.

  • Constructor Summary

    Constructors
    Constructor
    Description
    VisualSettings(int previewDurationSeconds, int previewMaxSessions, int previewMaxDisplays, int spawnsPerTick, int guideDurationSeconds, int guideLookAhead, String guideBlock, double guideElevation, double guideWidth, double guideThickness, double viewRange, int blockLight, int skyLight, boolean actionBar)
    Creates an instance of a VisualSettings record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns the value of the actionBar record component.
    int
    Returns the value of the blockLight record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    Returns the value of the guideBlock record component.
    int
    Returns the value of the guideDurationSeconds record component.
    double
    Returns the value of the guideElevation record component.
    int
    Returns the value of the guideLookAhead record component.
    double
    Returns the value of the guideThickness record component.
    double
    Returns the value of the guideWidth record component.
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the previewDurationSeconds record component.
    int
    Returns the value of the previewMaxDisplays record component.
    int
    Returns the value of the previewMaxSessions record component.
    read(org.bukkit.configuration.ConfigurationSection config)
     
    int
    Returns the value of the skyLight record component.
    int
    Returns the value of the spawnsPerTick record component.
    final String
    Returns a string representation of this record class.
    double
    Returns the value of the viewRange record component.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • VisualSettings

      public VisualSettings(int previewDurationSeconds, int previewMaxSessions, int previewMaxDisplays, int spawnsPerTick, int guideDurationSeconds, int guideLookAhead, String guideBlock, double guideElevation, double guideWidth, double guideThickness, double viewRange, int blockLight, int skyLight, boolean actionBar)
      Creates an instance of a VisualSettings record class.
      Parameters:
      previewDurationSeconds - the value for the previewDurationSeconds record component
      previewMaxSessions - the value for the previewMaxSessions record component
      previewMaxDisplays - the value for the previewMaxDisplays record component
      spawnsPerTick - the value for the spawnsPerTick record component
      guideDurationSeconds - the value for the guideDurationSeconds record component
      guideLookAhead - the value for the guideLookAhead record component
      guideBlock - the value for the guideBlock record component
      guideElevation - the value for the guideElevation record component
      guideWidth - the value for the guideWidth record component
      guideThickness - the value for the guideThickness record component
      viewRange - the value for the viewRange record component
      blockLight - the value for the blockLight record component
      skyLight - the value for the skyLight record component
      actionBar - the value for the actionBar record component
  • Method Details

    • read

      public static VisualSettings read(org.bukkit.configuration.ConfigurationSection config)
    • 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.
    • previewDurationSeconds

      public int previewDurationSeconds()
      Returns the value of the previewDurationSeconds record component.
      Returns:
      the value of the previewDurationSeconds record component
    • previewMaxSessions

      public int previewMaxSessions()
      Returns the value of the previewMaxSessions record component.
      Returns:
      the value of the previewMaxSessions record component
    • previewMaxDisplays

      public int previewMaxDisplays()
      Returns the value of the previewMaxDisplays record component.
      Returns:
      the value of the previewMaxDisplays record component
    • spawnsPerTick

      public int spawnsPerTick()
      Returns the value of the spawnsPerTick record component.
      Returns:
      the value of the spawnsPerTick record component
    • guideDurationSeconds

      public int guideDurationSeconds()
      Returns the value of the guideDurationSeconds record component.
      Returns:
      the value of the guideDurationSeconds record component
    • guideLookAhead

      public int guideLookAhead()
      Returns the value of the guideLookAhead record component.
      Returns:
      the value of the guideLookAhead record component
    • guideBlock

      public String guideBlock()
      Returns the value of the guideBlock record component.
      Returns:
      the value of the guideBlock record component
    • guideElevation

      public double guideElevation()
      Returns the value of the guideElevation record component.
      Returns:
      the value of the guideElevation record component
    • guideWidth

      public double guideWidth()
      Returns the value of the guideWidth record component.
      Returns:
      the value of the guideWidth record component
    • guideThickness

      public double guideThickness()
      Returns the value of the guideThickness record component.
      Returns:
      the value of the guideThickness record component
    • viewRange

      public double viewRange()
      Returns the value of the viewRange record component.
      Returns:
      the value of the viewRange record component
    • blockLight

      public int blockLight()
      Returns the value of the blockLight record component.
      Returns:
      the value of the blockLight record component
    • skyLight

      public int skyLight()
      Returns the value of the skyLight record component.
      Returns:
      the value of the skyLight record component
    • actionBar

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