/blockdata ~ ~-1 ~ {Lock:"Name of Key"}
- 1. Stand on the Chest you want to lock.
- 2. Use this command and type in the name you want the key to have.
- 3. Press Enter while standing on the chest
- (Make sure you don't remove the "", otherwise it won't work!