Got into a bit of trouble...

Both disorderly conduct and trespassing are violations (basically nothing).
Criminal trespassing is more serious.

S 240.20 Disorderly conduct.
A person is guilty of disorderly conduct when, with intent to cause
public inconvenience, annoyance or alarm, or recklessly creating a risk
thereof:

  1. He engages in fighting or in violent, tumultuous or threatening
    behavior; or
  2. He makes unreasonable noise; or
  3. In a public place, he uses abusive or obscene language, or makes an
    obscene gesture; or
  4. Without lawful authority, he disturbs any lawful assembly or
    meeting of persons; or
  5. He obstructs vehicular or pedestrian traffic; or
  6. He congregates with other persons in a public place and refuses to
    comply with a lawful order of the police to disperse; or
  7. He creates a hazardous or physically offensive condition by any act
    which serves no legitimate purpose.
    Disorderly conduct is a violation.

S 140.05 Trespass.
A person is guilty of trespass when he knowingly enters or remains
unlawfully in or upon premises.
Trespass is a violation.

S 140.10 Criminal trespass in the third degree.
A person is guilty of criminal trespass in the third degree when he
knowingly enters or remains unlawfully in a building or upon real
property
(a) which is fenced or otherwise enclosed in a manner designed to
exclude intruders; or
(b) where the building is utilized as an elementary or secondary
school or a children`s overnight camp as defined in section one thousand
three hundred ninety-two of the public health law or a summer day camp
as defined in section one thousand three hundred ninety-two of the
public health law in violation of conspicuously posted rules or
regulations governing entry and use thereof; or
(c) located within a city with a population in excess of one million
and where the building or real property is utilized as an elementary or
secondary school in violation of a personally communicated request to
leave the premises from a principal, custodian or other person in charge
thereof; or
(d) located outside of a city with a population in excess of one
million and where the building or real property is utilized as an
elementary or secondary school in violation of a personally communicated
request to leave the premises from a principal, custodian, school board
member or trustee, or other person in charge thereof; or
(e) where the building is used as a public housing project in
violation of conspicuously posted rules or regulations governing entry
and use thereof; or
(f) where a building is used as a public housing project in violation
of a personally communicated request to leave the premises from a
housing police officer or other person in charge thereof; or
(g) where the property consists of a right-of-way or yard of a
railroad or rapid transit railroad which has been designated and
conspicuously posted as a no-trespass railroad zone, pursuant to section
eighty-three-b of the railroad law, by the city or county in which such
property is located.
Criminal trespass in the third degree is a class B misdemeanor.

S 140.15 Criminal trespass in the second degree.
A person is guilty of criminal trespass in the second degree when he
knowingly enters or remains unlawfully in a dwelling.
Criminal trespass in the second degree is a class A misdemeanor.

S 140.17 Criminal trespass in the first degree.
A person is guilty of criminal trespass in the first degree when he
knowingly enters or remains unlawfully in a building, and when, in the
course of committing such crime, he:

  1. Possesses, or knows that another participant in the crime
    possesses, an explosive or a deadly weapon; or
  2. Possesses a firearm, rifle or shotgun, as those terms are defined
    in section 265.00, and also possesses or has readily accessible a
    quantity of ammunition which is capable of being discharged from such
    firearm, rifle or shotgun; or
  3. Knows that another participant in the crime possesses a firearm,
    rifle or shotgun under circumstances described in subdivision two.
    Criminal trespass in the first degree is a class D felony.