mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-11 20:13:55 +00:00
Parse empty sign lines as empty JSON strings.
Since the server doesn't bother validating sign text, and the client validates it by crashing. Note that this attempts to wrap strings as JSON, but hasn't been fully tested.
This commit is contained in:
@ -19,6 +19,7 @@
|
||||
|
||||
package com.sk89q.worldedit.util.gson;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.sk89q.worldedit.Vector;
|
||||
|
||||
@ -41,4 +42,8 @@ public final class GsonUtil {
|
||||
return gsonBuilder;
|
||||
}
|
||||
|
||||
private static final Gson gson = new Gson();
|
||||
public static String stringValue(String s) {
|
||||
return gson.toJson(s);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user