From c860c116b68286a2ec751809ecb3c06fc350c578 Mon Sep 17 00:00:00 2001 From: "Ash (ashisbored)" Date: Sun, 12 Dec 2021 16:57:24 +0000 Subject: [PATCH] refactor: Remove use of deprecated JsonParser (turns out I missed on in the update) --- src/main/java/io/github/ashisbored/playerpronouns/Config.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/io/github/ashisbored/playerpronouns/Config.java b/src/main/java/io/github/ashisbored/playerpronouns/Config.java index 7faea63..c0494b4 100644 --- a/src/main/java/io/github/ashisbored/playerpronouns/Config.java +++ b/src/main/java/io/github/ashisbored/playerpronouns/Config.java @@ -76,8 +76,7 @@ public class Config { } else { try { String s = Files.readString(path); - JsonParser parser = new JsonParser(); - JsonElement ele = parser.parse(s); + JsonElement ele = JsonParser.parseString(s); DataResult result = CODEC.decode(JsonOps.INSTANCE, ele).map(Pair::getFirst); Optional> err = result.error(); err.ifPresent(e -> PlayerPronouns.LOGGER.warn("Failed to load config: {}", e.message()));