I want to use the /give
command to give myself a broken elytra. So far I have /give @p elytra 1 0 {"Broken":1}
but that doesn't work. It then says
Component 'Broken' was not an object.
I want to use the /give
command to give myself a broken elytra. So far I have /give @p elytra 1 0 {"Broken":1}
but that doesn't work. It then says
Component 'Broken' was not an object.
Quick solution: /give @p elytra 1 431
Long explanation:
The syntax of the /give
command is the following:
give <player: target> <itemName: string> [amount: int] [data: int] [components: components]
player
is a target selector, in your case you want @p, meaning the nearest player to you, which is yourself.
itemName
is the name of the item, that's elytra
.
amount
is the number of items you want to have, since /give
requires at least 1 and the stack limit of elytra is 1, only 1 is possible.
data
is the so-called "metadata" of the item. The primary use of it and the reason it was originally added was for uses of an items. Since the durability of the elytra (0 or not) decides if it is broken, you can just set it to 431 to have a 0 durability elytra. (Or 432, I have two conflicting sources, just try it.)
components
is optional and you don't need it in this case. And since you're playing PE and not Java, you could only use "CanPlaceOn" (which is useless, because elytra can't be placed) and "CanDestroy" (which you don't want) anyway.
if you are playing in one of the newer versions it is now:
/give @p minecraft:elytra{Damage:431} 1