Is it possible to add multiple enchantments in one try?

Solution 1:

If you are using the command enchant, you can only do one enchantment per command block. There is a ways to do this though:

DataTags

When you summon or give an item, you can specify 'DataTags'. These tags give minecraft additional information about the item, for example it's display name or the enchantments it has (see further down for more information).

An example command for adding enchantments would be this one (gives Iron Leggings with Fire Protection III and Unbreaking I):

give @p iron_leggings 1 0 {ench:[{id:1,lvl:3},{id:34,lvl:1}]}

Or dropping an item on the ground:

summon Item ~ ~1 ~ {Item:{id:308,Count:1,Damage:0,tag:{ench:[{id:1,lvl:3},{id:34,lvl:1}]}}}

(You need a command block to test this, the chat will cut off the command)


In depth explanation

Looking at the syntax of the give command:

/give <player> <item> [amount] [data] [dataTags]

You can see the last argument, dataTags. Do not confuse this with data, which is the damage value of the item. They are formatted in JSON, and you can find a good tutorial here, but I will try to explain it too:

The the outer brackets {} mark a group of tags. In there, there is a key ench. This specifies a list of enchantments (surrounded by []). In the list, there are pairs of values with each an id and a lvl. These specify an enchantment.

You can get the ID's from this list: Minecraft Wiki

The level has to be a number, but you don't have to follow the normal Minecraft enchantment limits (you could make a tool with efficiency 100). Note that high enchantments will be displayed weirdly (but are fully functional).