Record Class Settings
java.lang.Object
java.lang.Record
dev.despical.mazeengine.config.Settings
public record Settings(int blocksPerTick, double millisPerTick, int maxConcurrent, int maxCells, long maxVolume, int maxChunks, int defaultCells, boolean protection, Set<String> replaceable, Map<String,Preset> presets, Messages messages, boolean preventMobSpawns, VisualSettings visuals, ProgressSettings progress)
extends Record
Contains the validated configuration published for the running plugin.
The value groups tick budgets, concurrent-operation limits, grid and volume limits, terrain protection, replaceable materials, presets, messages, and visual and boss-bar settings. Loading validates all participating files before constructing the replacement value.
The plugin publishes the replacement only after loading succeeds, leaving the previous settings available if a reload fails. Loaded maps and sets are copied or exposed read-only. Existing maze records retain their saved presets rather than inheriting subsequent edits to this current configuration.
-
Constructor Summary
ConstructorsConstructorDescriptionSettings(int blocksPerTick, double millisPerTick, int maxConcurrent, int maxCells, long maxVolume, int maxChunks, int defaultCells, boolean protection, Set<String> replaceable, Map<String, Preset> presets, Messages messages, boolean preventMobSpawns, VisualSettings visuals, ProgressSettings progress) Creates an instance of aSettingsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theblocksPerTickrecord component.intReturns the value of thedefaultCellsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static SettingsintmaxCells()Returns the value of themaxCellsrecord component.intReturns the value of themaxChunksrecord component.intReturns the value of themaxConcurrentrecord component.longReturns the value of themaxVolumerecord component.messages()Returns the value of themessagesrecord component.doubleReturns the value of themillisPerTickrecord component.presets()Returns the value of thepresetsrecord component.booleanReturns the value of thepreventMobSpawnsrecord component.progress()Returns the value of theprogressrecord component.booleanReturns the value of theprotectionrecord component.Returns the value of thereplaceablerecord component.final StringtoString()Returns a string representation of this record class.visuals()Returns the value of thevisualsrecord component.
-
Constructor Details
-
Settings
public Settings(int blocksPerTick, double millisPerTick, int maxConcurrent, int maxCells, long maxVolume, int maxChunks, int defaultCells, boolean protection, Set<String> replaceable, Map<String, Preset> presets, Messages messages, boolean preventMobSpawns, VisualSettings visuals, ProgressSettings progress) Creates an instance of aSettingsrecord class.- Parameters:
blocksPerTick- the value for theblocksPerTickrecord componentmillisPerTick- the value for themillisPerTickrecord componentmaxConcurrent- the value for themaxConcurrentrecord componentmaxCells- the value for themaxCellsrecord componentmaxVolume- the value for themaxVolumerecord componentmaxChunks- the value for themaxChunksrecord componentdefaultCells- the value for thedefaultCellsrecord componentprotection- the value for theprotectionrecord componentreplaceable- the value for thereplaceablerecord componentpresets- the value for thepresetsrecord componentmessages- the value for themessagesrecord componentpreventMobSpawns- the value for thepreventMobSpawnsrecord componentvisuals- the value for thevisualsrecord componentprogress- the value for theprogressrecord component
-
-
Method Details
-
load
-
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. -
blocksPerTick
public int blocksPerTick()Returns the value of theblocksPerTickrecord component.- Returns:
- the value of the
blocksPerTickrecord component
-
millisPerTick
public double millisPerTick()Returns the value of themillisPerTickrecord component.- Returns:
- the value of the
millisPerTickrecord component
-
maxConcurrent
public int maxConcurrent()Returns the value of themaxConcurrentrecord component.- Returns:
- the value of the
maxConcurrentrecord component
-
maxCells
public int maxCells()Returns the value of themaxCellsrecord component.- Returns:
- the value of the
maxCellsrecord component
-
maxVolume
public long maxVolume()Returns the value of themaxVolumerecord component.- Returns:
- the value of the
maxVolumerecord component
-
maxChunks
public int maxChunks()Returns the value of themaxChunksrecord component.- Returns:
- the value of the
maxChunksrecord component
-
defaultCells
public int defaultCells()Returns the value of thedefaultCellsrecord component.- Returns:
- the value of the
defaultCellsrecord component
-
protection
public boolean protection()Returns the value of theprotectionrecord component.- Returns:
- the value of the
protectionrecord component
-
replaceable
-
presets
-
messages
Returns the value of themessagesrecord component.- Returns:
- the value of the
messagesrecord component
-
preventMobSpawns
public boolean preventMobSpawns()Returns the value of thepreventMobSpawnsrecord component.- Returns:
- the value of the
preventMobSpawnsrecord component
-
visuals
Returns the value of thevisualsrecord component.- Returns:
- the value of the
visualsrecord component
-
progress
Returns the value of theprogressrecord component.- Returns:
- the value of the
progressrecord component
-