Improve item default attribute API
This commit is contained in:
@@ -2368,6 +2368,21 @@ public interface ItemType extends Keyed, Translatable, net.kyori.adventure.trans
|
||||
// @NotNull
|
||||
// EquipmentSlot getEquipmentSlot();
|
||||
|
||||
// Paper start - improve default item attribute API
|
||||
/**
|
||||
* Return an immutable copy of all default {@link Attribute}s and their
|
||||
* {@link AttributeModifier}s.
|
||||
* <p>
|
||||
* Default attributes are those that are always preset on some items, unless
|
||||
* they are specifically overridden on that {@link ItemStack}. Examples include
|
||||
* the attack damage on weapons or the armor value on armor.
|
||||
*
|
||||
* @return the immutable {@link Multimap} with the respective default
|
||||
* Attributes and modifiers, or an empty map if no attributes are set.
|
||||
*/
|
||||
@NotNull @org.jetbrains.annotations.Unmodifiable Multimap<Attribute, AttributeModifier> getDefaultAttributeModifiers();
|
||||
// Paper end - improve default item attribute API
|
||||
|
||||
/**
|
||||
* Return an immutable copy of all default {@link Attribute}s and their
|
||||
* {@link AttributeModifier}s for a given {@link EquipmentSlot}.
|
||||
|
||||
Reference in New Issue
Block a user