/** * 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; }
/** * Adds a Resident to the Datasource * * @param resident */ public void addResident(Resident resident) throws Exception { residents.put(resident.getUUID(), resident); }