Mod browser icon support

This commit is contained in:
Anuken
2021-02-06 12:05:59 -05:00
parent 7e4ffe6a7d
commit 25d013b768
10 changed files with 98 additions and 44 deletions

View File

@@ -238,8 +238,8 @@ public class ServerControl implements ApplicationListener{
Events.on(PlayEvent.class, e -> {
try{
JsonValue value = JsonIO.json().fromJson(null, Core.settings.getString("globalrules"));
JsonIO.json().readFields(state.rules, value);
JsonValue value = JsonIO.json.fromJson(null, Core.settings.getString("globalrules"));
JsonIO.json.readFields(state.rules, value);
}catch(Throwable t){
err("Error applying custom rules, proceeding without them.", t);
}
@@ -433,7 +433,7 @@ public class ServerControl implements ApplicationListener{
handler.register("rules", "[remove/add] [name] [value...]", "List, remove or add global rules. These will apply regardless of map.", arg -> {
String rules = Core.settings.getString("globalrules");
JsonValue base = JsonIO.json().fromJson(null, rules);
JsonValue base = JsonIO.json.fromJson(null, rules);
if(arg.length == 0){
info("Rules:\n@", JsonIO.print(rules));
@@ -467,7 +467,7 @@ public class ServerControl implements ApplicationListener{
JsonValue parent = new JsonValue(ValueType.object);
parent.addChild(value);
JsonIO.json().readField(state.rules, value.name, parent);
JsonIO.json.readField(state.rules, value.name, parent);
if(base.has(value.name)){
base.remove(value.name);
}