Let the random variables $X_1,X_2,\ldots,X_n$ iid $U[\theta-1\,,\theta+1]$. So the likelihood function therefore has the form:
$$L(\theta\mid X)=\prod_{i=1}^nf(X_i\mid \theta)=\frac{1}{2^n}I(X_1, \ldots , X_n \in [\theta-1\,,\theta+1])\text{ ?}$$
It is correct ?
Your likelihood function is correct.