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
ConstructorsConstructorDescriptionVisualSettings(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 aVisualSettingsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theactionBarrecord component.intReturns the value of theblockLightrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theguideBlockrecord component.intReturns the value of theguideDurationSecondsrecord component.doubleReturns the value of theguideElevationrecord component.intReturns the value of theguideLookAheadrecord component.doubleReturns the value of theguideThicknessrecord component.doubleReturns the value of theguideWidthrecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of thepreviewDurationSecondsrecord component.intReturns the value of thepreviewMaxDisplaysrecord component.intReturns the value of thepreviewMaxSessionsrecord component.static VisualSettingsread(org.bukkit.configuration.ConfigurationSection config) intskyLight()Returns the value of theskyLightrecord component.intReturns the value of thespawnsPerTickrecord component.final StringtoString()Returns a string representation of this record class.doubleReturns the value of theviewRangerecord component.
-
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 aVisualSettingsrecord class.- Parameters:
previewDurationSeconds- the value for thepreviewDurationSecondsrecord componentpreviewMaxSessions- the value for thepreviewMaxSessionsrecord componentpreviewMaxDisplays- the value for thepreviewMaxDisplaysrecord componentspawnsPerTick- the value for thespawnsPerTickrecord componentguideDurationSeconds- the value for theguideDurationSecondsrecord componentguideLookAhead- the value for theguideLookAheadrecord componentguideBlock- the value for theguideBlockrecord componentguideElevation- the value for theguideElevationrecord componentguideWidth- the value for theguideWidthrecord componentguideThickness- the value for theguideThicknessrecord componentviewRange- the value for theviewRangerecord componentblockLight- the value for theblockLightrecord componentskyLight- the value for theskyLightrecord componentactionBar- the value for theactionBarrecord component
-
-
Method Details
-
read
-
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. -
previewDurationSeconds
public int previewDurationSeconds()Returns the value of thepreviewDurationSecondsrecord component.- Returns:
- the value of the
previewDurationSecondsrecord component
-
previewMaxSessions
public int previewMaxSessions()Returns the value of thepreviewMaxSessionsrecord component.- Returns:
- the value of the
previewMaxSessionsrecord component
-
previewMaxDisplays
public int previewMaxDisplays()Returns the value of thepreviewMaxDisplaysrecord component.- Returns:
- the value of the
previewMaxDisplaysrecord component
-
spawnsPerTick
public int spawnsPerTick()Returns the value of thespawnsPerTickrecord component.- Returns:
- the value of the
spawnsPerTickrecord component
-
guideDurationSeconds
public int guideDurationSeconds()Returns the value of theguideDurationSecondsrecord component.- Returns:
- the value of the
guideDurationSecondsrecord component
-
guideLookAhead
public int guideLookAhead()Returns the value of theguideLookAheadrecord component.- Returns:
- the value of the
guideLookAheadrecord component
-
guideBlock
Returns the value of theguideBlockrecord component.- Returns:
- the value of the
guideBlockrecord component
-
guideElevation
public double guideElevation()Returns the value of theguideElevationrecord component.- Returns:
- the value of the
guideElevationrecord component
-
guideWidth
public double guideWidth()Returns the value of theguideWidthrecord component.- Returns:
- the value of the
guideWidthrecord component
-
guideThickness
public double guideThickness()Returns the value of theguideThicknessrecord component.- Returns:
- the value of the
guideThicknessrecord component
-
viewRange
public double viewRange()Returns the value of theviewRangerecord component.- Returns:
- the value of the
viewRangerecord component
-
blockLight
public int blockLight()Returns the value of theblockLightrecord component.- Returns:
- the value of the
blockLightrecord component
-
skyLight
public int skyLight()Returns the value of theskyLightrecord component.- Returns:
- the value of the
skyLightrecord component
-
actionBar
public boolean actionBar()Returns the value of theactionBarrecord component.- Returns:
- the value of the
actionBarrecord component
-