Commands/attribute

Used to change or read attributes.

Details

 * Returns the total value of the specified attribute.
 * Returns the total value of the specified attribute.
 * Returns the total value of the specified attribute.


 * Returns the base value of the specified attribute.
 * Returns the base value of the specified attribute.


 * Overwrites the base value of the specified attribute with the given value.
 * Overwrites the base value of the specified attribute with the given value.


 * Adds an attribute modifier with the specified properties if no modifier with the same UUID already existed.
 * Adds an attribute modifier with the specified properties if no modifier with the same UUID already existed.
 * Adds an attribute modifier with the specified properties if no modifier with the same UUID already existed.


 * Removes the attribute modifier with the specified UUID.
 * Removes the attribute modifier with the specified UUID.


 * Returns the value of the modifier with the specified UUID.
 * Returns the value of the modifier with the specified UUID.

Arguments

 * The entity that the attribute is applied to. Only accepts a single target. Only players, armor stands, and mobs have attributes.
 * The entity that the attribute is applied to. Only accepts a single target. Only players, armor stands, and mobs have attributes.


 * The namespaced ID of the specified attribute.
 * The namespaced ID of the specified attribute.


 * The number the value is multiplied with before being returned.
 * The number the value is multiplied with before being returned.


 * Specifies the UUID of the modifier in the hyphenated hexadecimal format. Modifiers with the same UUID do not stack.
 * Specifies the UUID of the modifier in the hyphenated hexadecimal format. Modifiers with the same UUID do not stack.

Result
When using, fails if the modifier is already present.

When using, fails if the value an invalid double (64-bit integer) value.

On success, changes or returns the attribute value.

Examples

 * To set the minimum armor value of yourself to 5:

History
Befehl/attribute Comandos/attribute 命令/attribute