use of com.minecolonies.coremod.colony.jobs.JobFarmer in project minecolonies by Minecolonies.
the class BuildingFarmer method createJob.
@NotNull
@Override
public AbstractJob createJob(@NotNull final CitizenData citizen) {
if (!farmerFields.isEmpty()) {
for (@NotNull final Field field : farmerFields) {
final Field colonyField = getColony().getField(field.getID());
if (colonyField != null) {
colonyField.setOwner(citizen.getName());
}
field.setOwner(citizen.getName());
}
}
return new JobFarmer(citizen);
}