Skip to content

Commit ede4001

Browse files
committed
Fixed sections and comments not being added in some cases
1 parent 1cfa4f3 commit ede4001

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.github.thatsmusic99</groupId>
88
<artifactId>ConfigurationMaster</artifactId>
9-
<version>v1.0-RC-1</version>
9+
<version>v1.0-RC-2</version>
1010

1111
<build>
1212
<plugins>

src/main/java/io/github/thatsmusic99/configurationmaster/CMFile.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -671,9 +671,10 @@ public void addDefault(@NotNull String path, Object value, @NotNull String secti
671671
if (config == null) {
672672
throw new NullPointerException("Configuration is not loading yet, please use addDefault within the loadDefaults method.");
673673
}
674-
addDefault(path, value);
675674
addSection(section);
676675
addComment(path, comment);
676+
addDefault(path, value);
677+
677678
}
678679

679680
/**
@@ -694,8 +695,8 @@ public void addDefault(@NotNull String path, Object value, @NotNull String comme
694695
if (config == null) {
695696
throw new NullPointerException("Configuration is not loading yet, please use addDefault within the loadDefaults method.");
696697
}
697-
addDefault(path, value);
698698
addComment(path, comment);
699+
addDefault(path, value);
699700
}
700701

701702
/**

src/main/resources/plugin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
main: io.github.thatsmusic99.configurationmaster.ConfigurationMaster
22
name: ConfigurationMaster
3-
version: 1.0-RC-1
3+
version: 1.0-RC-2
44
author: Thatsmusic99
55
api-version: 1.13

0 commit comments

Comments
 (0)