@@ -57,7 +57,7 @@ public String save(final @NotNull ConfigSection root) {
5757 private ConfigNode parseNode (@ NotNull String line , final @ NotNull BufferedReader reader , final int depth , final @ NotNull Set <String > tempComments ) throws Exception {
5858 if (line .isBlank () || line .trim ().startsWith ("-" )) return null ;
5959
60- final String indent = InscriptConstants .INDENT .get ().apply (depth );
60+ final String indent = InscriptConstants .INDENT .getValue ().apply (depth );
6161 if (!line .startsWith (indent )) return null ;
6262
6363 line = line .substring (indent .length ()).trim ();
@@ -167,7 +167,7 @@ public String getKey() {
167167 section .getComments ().addAll (tempComments );
168168 tempComments .clear ();
169169
170- final String justReadExpectedChildIndent = InscriptConstants .INDENT .get ().apply (depth + 1 );
170+ final String justReadExpectedChildIndent = InscriptConstants .INDENT .getValue ().apply (depth + 1 );
171171 if (justRead .startsWith (justReadExpectedChildIndent ) && !justRead .trim ().startsWith ("-" )) {
172172 final ConfigNode childNode = parseNode (justRead , reader , depth + 1 , tempComments );
173173 if (childNode != null ) section .getChildren ().add (childNode );
@@ -176,7 +176,7 @@ public String getKey() {
176176 String childLine ;
177177
178178 while ((childLine = reader .readLine ()) != null ) {
179- final String expectedChildIndent = InscriptConstants .INDENT .get ().apply (depth + 1 );
179+ final String expectedChildIndent = InscriptConstants .INDENT .getValue ().apply (depth + 1 );
180180 if (!childLine .startsWith (expectedChildIndent ) && !childLine .trim ().startsWith ("-" )) break ;
181181
182182 final ConfigNode childNode = parseNode (childLine , reader , depth + 1 , tempComments );
@@ -298,7 +298,7 @@ public String getKey() {
298298 private void writeNode (final @ NotNull InscriptStringWriter writer , final @ NotNull ConfigNode node , final int depth ) {
299299 if (depth < 0 ) throw new InscriptException ();
300300
301- final String indent = InscriptConstants .INDENT .get ().apply (depth );
301+ final String indent = InscriptConstants .INDENT .getValue ().apply (depth );
302302
303303 final String key = node .getKey ();
304304
@@ -309,7 +309,7 @@ private void writeNode(final @NotNull InscriptStringWriter writer, final @NotNul
309309 }
310310
311311 if (section .getChildren ().isEmpty ()) {
312- writer .write (indent + key + ":\n " + InscriptConstants .INDENT .get ().apply (1 ) + "\n " );
312+ writer .write (indent + key + ":\n " + InscriptConstants .INDENT .getValue ().apply (1 ) + "\n " );
313313 return ;
314314 }
315315
@@ -341,9 +341,9 @@ private void writeNode(final @NotNull InscriptStringWriter writer, final @NotNul
341341 final InlineValue <Object > value = ValueRegistry .REGISTRY .<Object >getInline (element .getClass ()).orElse (null );
342342
343343 if (value == null ) {
344- writer .write (indent + InscriptConstants .INDENT .get ().apply (1 ) + "- " + element );
344+ writer .write (indent + InscriptConstants .INDENT .getValue ().apply (1 ) + "- " + element );
345345 } else {
346- writer .write (indent + InscriptConstants .INDENT .get ().apply (1 ) + "- " + value .serialize (element ));
346+ writer .write (indent + InscriptConstants .INDENT .getValue ().apply (1 ) + "- " + value .serialize (element ));
347347 }
348348
349349 writer .newLine ();
0 commit comments