Beispiel #1
0
 // Save settings for this NPC. These values will be added to the citizens
 // saves.yml under this NPC.
 public void save(DataKey key) {
   //		key.setBoolean("SomeSetting", SomeSetting);
   key.setString("NPCType", npcType.name());
   key.setString("UnitType", unitType.name());
   key.setInt("settleId", settleId);
   key.setInt("buildingId", buildingId);
   //		System.out.println("[REALMS] Trait save setting : "+key.toString());
 }
 private static void saveRegions(DataKey key, Multimap<String, TaggedRegion> tags) {
   for (Entry<String, TaggedRegion> entry : tags.entries()) {
     DataKey sub = key.getRelative(entry.getKey());
     int length = sub.getInt("length", 0) + 1;
     sub.setInt("length", length);
     saveRegion(sub.getRelative(length), entry.getValue());
   }
 }