Command Block Trouble
Lets simplify your command by removing all lot of data.
/give @p diamond_sword 1 0 {display:{...},AttributeModifiers:[{...},{ench:[{...}]}}
AttributeModifiers has no ]
before the enchantment section. The enchantment section is contained in curly brackets and should not be. This would give us:
/give @p diamond_sword 1 0 {display:{...},AttributeModifiers:[{...}],ench:[{...}]}
The last thing, Slot:0b
does not work with attribute modifiers to my knowledge. If you are wanting it to be in the main hand, the proper slot name is "mainhand"
Which would give us a final command of:
/give @p diamond_sword 1 0 {display:{Name:"Sword",Lore:["Smexy"]},AttributeModifiers:[{AttributeName:"generic.attackSpeed",Name:"generic.attackSpeed",Amount:100,Operation:1,UUIDMost:307,UUIDLeast:307,Slot:"mainhand"}],ench:[{id:16,lvl:10}]}
Which gives us this guy:
Minecraft commands expect every certain symbols to be paired with each other. In particular, every [
or {
should be matched with a ]
or }
, respectively. These symbols work similarly to parenthesis in Mathematics, they indicate that their contents should be considered as a single item. So the error message Expected ']' but got '<EOF>'
means that your command had a [
symbol, but Minecraft couldn't find a ]
to go with it.
In your particular case, Minecraft couldn't find a ]
to go with the [
found right after AttributeModifiers:
. So you should add a ]
after all the attributes; specifically, between the last two }
characters. This results in the following command, which executes successfully:
/give @p diamond_sword 1 0 {display:{Name:"Sword",Lore:["Smexy"]},AttributeModifiers:[{AttributeName:"generic.attackSpeed",Name:"generic.attackSpeed",Amount:100,Operation:1,UUIDMost:307,UUIDLeast:307,Slot:0b},{ench:[{id:16,lvl:10}]}]}