For Windows 10 Edition, press theTkey to open the chat window. For Education Edition, press theTkey to open the chat window. 2. Type the Command First, it's important to note that when you use the /enchant command you can enchant the item that a player is holding. This is the item...
This will bring up the programming console for the command block. Now, type your command in the "Console Command" text box. The following command(s) will give a diamond sword to the nearest player that is enchanted withSharpness V,Knockback II,Fire Aspect II,Looting III, andUnbreaking III....
/clear DigMinecraft diamond_sword{ench:[{id:16}]} To remove all diamond swords that are enchanted withSharpness V(only level 5 of this enchantment) from DigMinecraft's inventory: /clear DigMinecraft diamond_sword{ench:[{id:16,lvl:5}]} Examples that Check for Items in a Player's Inventory ...