mirror of
https://github.com/ashhhleyyy/player-pronouns.git
synced 2024-11-01 07:07:38 +00:00
refactor: Remove use of deprecated JsonParser (turns out I missed on in the update)
This commit is contained in:
parent
cdb91ea0e4
commit
c860c116b6
1 changed files with 1 additions and 2 deletions
|
@ -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<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()));
|
||||
|
|
Loading…
Reference in a new issue