If it appear that the plaintiff was forcibly or unlawfully turned out of the possession, or that it was unlawfully detained from him unless it also appear that the defendant has wrongfully held or detained the possession for three years before the date of the summons the verdict shall be for the plaintiff for such premises, or such part thereof as may be found to have been so held or detained, and for such damages as the plaintiff shall be entitled to recover for the detention for such premises or such part thereof. When part only of the premises is found for the plaintiff, the verdict shall describe the part so found. In such cases, judgment shall be for the plaintiff. If the verdict be for the defendant as to the whole, judgment shall be for him