/*
* Sets up miscellaneous variables, mostly reading from property files.
*/
public static void setupVariables() {
PropertyManager.registerProperties();
Storage local = null;
// Only load settings for loaded NPC types
for (String t : Citizens.loadedTypes) {
nodes.add(new Node("", SettingsType.GENERAL, "economy.prices." + t + ".creation", 100));
if (NPCTypeManager.getType(t).getProperties().getNodes() == null) {
continue;
}
for (Node node : NPCTypeManager.getType(t).getProperties().getNodes()) {
nodes.add(node);
}
}
for (Node node : nodes) {
local = node.getFile();
if (!local.keyExists(node.getPath())) {
Messaging.log("Writing default setting " + node.getPath() + ".");
local.setRaw(node.getPath(), node.getValue());
} else {
node.set(local.getRaw(node.getPath()));
}
loadedNodes.put(node.getName(), node);
local.save();
}
}