コード例 #1
0
  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);
  }
コード例 #2
0
  @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;
  }