3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-09-17 01:23:43 +02:00

Accept plain strings for components

Addresses #1968
Dieser Commit ist enthalten in:
KennyTV 2020-08-06 10:15:38 +02:00
Ursprung cf7d49aec5
Commit ea0f91136e
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B

Datei anzeigen

@ -106,9 +106,13 @@ public class ComponentRewriter {
processText(root); processText(root);
return root; return root;
} catch (JsonSyntaxException e) { } catch (JsonSyntaxException e) {
if (Via.getManager().isDebug()) {
Via.getPlatform().getLogger().severe("Error when trying to parse json: " + value); Via.getPlatform().getLogger().severe("Error when trying to parse json: " + value);
throw e; throw e;
} }
// Yay to malformed json being accepted
return new JsonPrimitive(value);
}
} }
public void processText(JsonElement element) { public void processText(JsonElement element) {