Package org.bukkit.attribute

# Interface Attributable

All Known Subinterfaces:
  `AbstractHorse`, `AbstractSkeleton`, `AbstractVillager`, `Ageable`, `Ambient`, `Animals`, `ArmorStand`, `Axolotl`, `Bat`, `Bee`, `Blaze`, `Breedable`, `Cat`, `CaveSpider`, `ChestedHorse`, `Chicken`, `Cod`, `ComplexLivingEntity`, `Cow`, `Creature`, `Creeper`, `Dolphin`, `Donkey`, `Drowned`, `ElderGuardian`, `EnderDragon`, `Enderman`, `Endermite`, `Evoker`, `Fish`, `Flying`, `Fox`, `Ghast`, `Giant`, `GlowSquid`, `Goat`, `Golem`, `Guardian`, `Hoglin`, `Horse`, `HumanEntity`, `Husk`, `Illager`, `Illusioner`, `IronGolem`, `LivingEntity`, `Llama`, `MagmaCube`, `Mob`, `Monster`, `Mule`, `MushroomCow`, `NPC`, `Ocelot`, `Panda`, `Parrot`, `Phantom`, `Pig`, `Piglin`, `PiglinAbstract`, `PiglinBrute`, `PigZombie`, `Pillager`, `Player`, `PolarBear`, `PufferFish`, `Rabbit`, `Raider`, `RangedEntity`, `Ravager`, `Salmon`, `Sheep`, `Shulker`, `Silverfish`, `Skeleton`, `SkeletonHorse`, `Slime`, `Snowman`, `Spellcaster`, `Spider`, `Squid`, `Steerable`, `Stray`, `Strider`, `Tameable`, `TraderLlama`, `TropicalFish`, `Turtle`, `Vex`, `Villager`, `Vindicator`, `WanderingTrader`, `WaterMob`, `Witch`, `Wither`, `WitherSkeleton`, `Wolf`, `Zoglin`, `Zombie`, `ZombieHorse`, `ZombieVillager`

public interface Attributable
Represents an object which may contain attributes.

## Method Summary

Modifier and Type
Method
Description
`@Nullable AttributeInstance`
`getAttribute(@NotNull Attribute attribute)`
Gets the specified attribute instance from the object.
`void`
`registerAttribute(@NotNull Attribute attribute)`
Registers a generic attribute to that attributable instance.

## Method Details

### getAttribute

@Nullable @Nullable AttributeInstance getAttribute(@NotNull @NotNull Attribute attribute)
Gets the specified attribute instance from the object. This instance will be backed directly to the object and any changes will be visible at once.

Parameters:
  `attribute` - the attribute to get
Returns:
  the attribute instance or null if not applicable to this object

### registerAttribute

void registerAttribute(@NotNull @NotNull Attribute attribute)
Registers a generic attribute to that attributable instance. Allows it to add attributes not registered by default to that entity.

Parameters:
  `attribute` - the generic attribute to register