Minecraft wiki entry for Traps, associated text: Make a water elevator using soul sand bubble column, but without an exit at the top. The column will force the unfortunate player upward, where they will be trapped against the ceiling, unable to break their way out because of the fact that blocks break much slower underwater. Cobblestone can be swapped for obsidian. This can also be used reversely, with magma blocks, taking advantage of the fact players cannot swim upwards easily. In both cases, the players may not drown since they're in a bubble column, or you could make it more dangerous and put a sign with lava on the top but make sure to not have the blocks the lava is touching or is around is not flammable as it will burn.