Some minor improvements to ConfigHelper
This commit is contained in:
parent
957f1de812
commit
17ea1755e8
1 changed files with 13 additions and 6 deletions
|
@ -36,7 +36,7 @@ public class ConfigHelper
|
|||
public static Gson serializer = new GsonBuilder().setPrettyPrinting().create();
|
||||
public static JsonParser parser = new JsonParser();
|
||||
public JsonBlockState blockStateParser = new JsonBlockState();
|
||||
public WrappedJsonObject root;
|
||||
public WrappedJsonObject root = null;
|
||||
public ArrayList<String> messages = new ArrayList<String>();
|
||||
|
||||
|
||||
|
@ -60,6 +60,11 @@ public class ConfigHelper
|
|||
this.parse(jsonString);
|
||||
}
|
||||
|
||||
public boolean isNull()
|
||||
{
|
||||
return this.root == null;
|
||||
}
|
||||
|
||||
public void parse(String jsonString)
|
||||
{
|
||||
this.root = null;
|
||||
|
@ -157,13 +162,13 @@ public class ConfigHelper
|
|||
|
||||
private static enum Types {BOOLEAN, STRING, INTEGER, FLOAT, BLOCKSTATE}
|
||||
|
||||
private class WrappedJsonObject
|
||||
public class WrappedJsonObject
|
||||
{
|
||||
|
||||
private JsonObject obj;
|
||||
private ConfigHelper conf;
|
||||
|
||||
protected JsonObject obj;
|
||||
protected ConfigHelper conf;
|
||||
WrappedJsonObject(ConfigHelper conf, JsonObject obj)
|
||||
public WrappedJsonObject(ConfigHelper conf, JsonObject obj)
|
||||
{
|
||||
this.obj = obj;
|
||||
this.conf = conf;
|
||||
|
@ -379,4 +384,6 @@ public class ConfigHelper
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
Loading…
Reference in a new issue