程序包 org.bukkit.attribute

# 接口 Attributable

所有已知子接口:
  `AbstractHorse`, `AbstractSkeleton`, `AbstractVillager`, `Ageable`, `Allay`, `Ambient`, `Animals`, `Armadillo`, `ArmorStand`, `Axolotl`, `Bat`, `Bee`, `Blaze`, `Bogged`, `Breedable`, `Breeze`, `Camel`, `Cat`, `CaveSpider`, `ChestedHorse`, `Chicken`, `Cod`, `ComplexLivingEntity`, `Cow`, `Creature`, `Creeper`, `Dolphin`, `Donkey`, `Drowned`, `ElderGuardian`, `EnderDragon`, `Enderman`, `Endermite`, `Enemy`, `Evoker`, `Fish`, `Flying`, `Fox`, `Frog`, `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`, `Ravager`, `Salmon`, `Sheep`, `Shulker`, `Silverfish`, `Skeleton`, `SkeletonHorse`, `Slime`, `Sniffer`, `Snowman`, `Spellcaster`, `Spider`, `Squid`, `Steerable`, `Stray`, `Strider`, `Tadpole`, `Tameable`, `TraderLlama`, `TropicalFish`, `Turtle`, `Vex`, `Villager`, `Vindicator`, `WanderingTrader`, `Warden`, `WaterMob`, `Witch`, `Wither`, `WitherSkeleton`, `Wolf`, `Zoglin`, `Zombie`, `ZombieHorse`, `ZombieVillager`

public interface Attributable
用于表示一个可以包含属性的对象.

- ## 方法概要

  修饰符和类型
  方法
  说明
  `@Nullable AttributeInstance`
  `getAttribute(@NotNull Attribute attribute)`
  从指定的一个对象内获取对应的属性.

- ## 方法详细资料

  - ### 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.

    参数:
      `attribute` - Attribute 实例
    返回:
      这个方法会返回一个 AttributeInstance, 如果不适用于此对象, 将返回 null