Here is a link to a tutorial on how to make a very effective, fairly simple and undetectable (to the naked eye at least) pitfall trap. You could easily disguise this into a mineshaft or other form of tunnel, and you even get to keep the items. Unfortunately there is no reasonable way for you to get past it yourself without setting it off, however when I built this to protect my house this was just a decoy entrance, and the actual entrance was off to the side at the bottom of a small lake. This was incredibly effective at stopping them and I even managed to snag a decent amount of high value items from wannabe raiders who fell for it (Including an impressive stack of 64 TNT, and 28 Diamonds from the same guy haha) and since most raiders wander aimlessly looking for houses to grief, they usually cannot find their way back.
Enjoy :)
Oh, and if you can find the right formation of bedrock, it is possible to "trap" players by putting water in a 3m deep pit surrounded bedrock at the bottom of the map. The water makes it impossible to jump high enough to place a block underneath you to get out so the only escape is to teleport out or die of hunger.