An Erin man was sentenced for having a gun he wasn’t allowed to have while trespassing on a property in Bradford County.