public void removeAllPets() { Iterator<LivingPet> i = pets.listIterator(); while (i.hasNext()) { LivingPet p = i.next(); saveFileData("autosave", p); ec.SPH.saveToDatabase(p, false); p.removePet(); i.remove(); } }
public void removePets(Player player) { Iterator<LivingPet> i = pets.listIterator(); while (i.hasNext()) { LivingPet p = i.next(); if (p.getOwner().getName().equals(player.getName())) { /*saveFileData("autosave", p); ec.SPH.saveToDatabase(p, false);*/ p.removePet(); i.remove(); } } }