He probably exploited a glitch. As far as I know, enchanted hacks don't work because you need creative mod for it. If you have creative mode (or in some cases /i or /give) then they work. There is a mod called AllUWantInventory. It basically spawns any enchanted level, with formatted names etc etc. though you need creative or /give. Its for 1.7.10, but it may update to 1.8