public static LoseZone deserialize(ConfigurationSection section) { int id = section.getInt("id"); Location first = Parser.convertStringtoLocation(section.getString("first")); Location second = Parser.convertStringtoLocation(section.getString("second")); return new LoseZone(first, second, id); }
@Override public ConfigurationSection serialize() { MemorySection section = new MemoryConfiguration(); section.set("id", id); section.set("first", Parser.convertLocationtoString(firstPoint)); section.set("second", Parser.convertLocationtoString(secondPoint)); return section; }