loadOldConfig();
}
private void loadChests(NBTList<NBTCompound> node) {
for (int i = 0; i < node.size(); i++) {
NBTCompound tag = node.get(i);
Coordinate coord;
try {
coord = new Coordinate(tag.getCompound("coordinate"));
} catch (Exception e) {
System.out.println("Skipping corrupt chest");
continue;
}
Chest chest;
if (!tag.containsKey("owner")) {
chest = new Chest(coord);
} else {
String owner = tag.getString("owner").get();
if (!tag.containsKey("name")) {
chest = new Chest(owner, coord);
} else {
chest = new Chest(owner, coord, tag.getString("name").get());
}
}
locations.put(coord, chest);
}
}