Minecraft wiki entry for Command_blocks_and_functions, associated text: Alternatively, giving the player certain status effects at high levels using the /effect command can mimic the effect of a jail. Use /effect give @p minecraft:slowness <insert duration of effect> 127 to keep the player from moving, and /effect give @p minecraft:mining_fatigue <insert duration of effect> 127 to keep the player from breaking things. If player really want to kick it up a notch, poison the player (use one of the previous two commands, but replace the first number with 19).