Skip to content

Commit 331b380

Browse files
committed
Fixed sections not being added
1 parent 3880da5 commit 331b380

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
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.1</version>
9+
<version>v1.0.2</version>
1010

1111
<build>
1212
<plugins>

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,11 @@ public void addComment(@NotNull String path, @NotNull String comment) {
719719
comments.put(path.split("\\.")[0], builder.toString());
720720
builder = new StringBuilder();
721721
builder.append(comment);
722-
comments.put(path, builder.toString());
722+
if (comments.containsKey(path)) {
723+
comments.put(path, comments.get(path) + builder.toString());
724+
} else {
725+
comments.put(path, builder.toString());
726+
}
723727
}
724728

725729
/**

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.1
3+
version: 1.0.2
44
author: Thatsmusic99
55
api-version: 1.13

0 commit comments

Comments
 (0)