I'm currently programming a Minecraft plugin for version 1.8.8.
Now I have had a Villager spawn by command with slowness so that it can't move.
However, players can still push it away by sneaking and running against the Villager.
Does anyone know how I can prevent this?
I don't know exactly what you want to do but with invisibility blocks I would install the villager and leave a 1 × 1 hole
Entity.setAI (false);