示例#1
0
  /**
   * Removes a Resident from the Datasource
   *
   * @param resident
   */
  public boolean removeResident(Resident resident) {
    boolean result = residents.remove(resident.getUUID()) != null;

    for (Town t : towns.values()) if (t.hasResident(resident)) t.removeResident(resident);

    return result;
  }
示例#2
0
 /**
  * Adds a Resident to the Datasource
  *
  * @param resident
  */
 public void addResident(Resident resident) throws Exception {
   residents.put(resident.getUUID(), resident);
 }