Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-10-08 11:10:06 +02:00
Fix issue with formatting :) (fixes quotes)
Dieser Commit ist enthalten in:
Ursprung
f462ff9e8a
Commit
0d0e1c16ea
@ -656,11 +656,15 @@ public class OutgoingTransformer {
|
||||
if (line == null || line.equalsIgnoreCase("null")) {
|
||||
line = "{\"text\":\"\"}";
|
||||
} else {
|
||||
if (!line.startsWith("\"") && !line.startsWith("{"))
|
||||
line = "\"" + line + "\"";
|
||||
if (line.startsWith("\""))
|
||||
if (!line.startsWith("\"") && !line.startsWith("{")) {
|
||||
JSONObject obj = new JSONObject();
|
||||
obj.put("text", line);
|
||||
line = obj.toJSONString();
|
||||
}
|
||||
if (line.startsWith("\"")) {
|
||||
line = "{\"text\":" + line + "}";
|
||||
}
|
||||
}
|
||||
try {
|
||||
new JSONParser().parse(line);
|
||||
} catch (Exception e) {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren