Skip to content

Commit 7bcd5cb

Browse files
authored
Fix non-empty event values in JSONGenerator (SkriptLang#7656)
* init commit * update version
1 parent a95457b commit 7bcd5cb

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/main/java/ch/njol/skript/doc/JSONGenerator.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public class JSONGenerator extends DocumentationGenerator {
3636
/**
3737
* The current version of the JSON generator
3838
*/
39-
public static final Version JSON_VERSION = new Version(1, 0);
39+
public static final Version JSON_VERSION = new Version(1, 1);
4040

4141
private static final Gson GSON = new GsonBuilder()
4242
.disableHtmlEscaping()
@@ -200,6 +200,10 @@ private static JsonArray getEventValues(SkriptEventInfo<?> info) {
200200
}
201201
}
202202

203+
if (eventValues.isEmpty()) {
204+
return null;
205+
}
206+
203207
JsonArray array = new JsonArray();
204208
for (JsonObject eventValue : eventValues) {
205209
array.add(eventValue);

0 commit comments

Comments
 (0)