Skip to content

Commit

Permalink
refactor: Remove use of deprecated JsonParser (turns out I missed on …
Browse files Browse the repository at this point in the history
…in the update)
  • Loading branch information
ashhhleyyy committed Dec 12, 2021
1 parent cdb91ea commit c860c11
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ public static Config load() {
} else {
try {
String s = Files.readString(path);
JsonParser parser = new JsonParser();
JsonElement ele = parser.parse(s);
JsonElement ele = JsonParser.parseString(s);
DataResult<Config> result = CODEC.decode(JsonOps.INSTANCE, ele).map(Pair::getFirst);
Optional<DataResult.PartialResult<Config>> err = result.error();
err.ifPresent(e -> PlayerPronouns.LOGGER.warn("Failed to load config: {}", e.message()));
Expand Down

0 comments on commit c860c11

Please sign in to comment.