Fix signs correcting any json issues.

This commit is contained in:
Myles 2016-02-29 21:27:17 +00:00
parent a6cfcac675
commit 6f605e8d6c

View File

@ -276,7 +276,12 @@ public class OutgoingTransformer {
output.writeLong(location);
for (int i = 0; i < 4; i++) {
String line = PacketUtil.readString(input);
if(line.startsWith("\"")){
if (line == null || line.equalsIgnoreCase("null")) {
line = "{\"text\":\"\"}";
} else {
if (!line.startsWith("\"") && !line.startsWith("{"))
line = "\"" + line + "\"";
if (line.startsWith("\""))
line = "{\"text\":" + line + "}";
}
PacketUtil.writeString(line, output);