mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-12-26 02:17:40 +01:00
Fix signs correcting any json issues.
This commit is contained in:
parent
a6cfcac675
commit
6f605e8d6c
@ -271,13 +271,18 @@ public class OutgoingTransformer {
|
||||
}
|
||||
return;
|
||||
}
|
||||
if(packet == PacketType.PLAY_UPDATE_SIGN){
|
||||
if (packet == PacketType.PLAY_UPDATE_SIGN) {
|
||||
Long location = input.readLong();
|
||||
output.writeLong(location);
|
||||
for(int i = 0;i<4;i++){
|
||||
for (int i = 0; i < 4; i++) {
|
||||
String line = PacketUtil.readString(input);
|
||||
if(line.startsWith("\"")){
|
||||
line = "{\"text\":" + line + "}";
|
||||
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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user