Interface Attributable

All Known Subinterfaces:
AbstractHorse, AbstractVillager, Ageable, Ambient, Animals, ArmorStand, Bat, Bee, Blaze, Cat, CaveSpider, ChestedHorse, Chicken, Cod, ComplexLivingEntity, Cow, Creature, Creeper, Dolphin, Donkey, Drowned, ElderGuardian, EnderDragon, Enderman, Endermite, Evoker, Fish, Flying, Fox, Ghast, Giant, Golem, Guardian, Hoglin, Horse, HumanEntity, Husk, Illager, Illusioner, IronGolem, LivingEntity, Llama, MagmaCube, Mob, Monster, Mule, MushroomCow, NPC, Ocelot, Panda, Parrot, Phantom, Pig, Piglin, PigZombie, Pillager, Player, PolarBear, PufferFish, Rabbit, Raider, 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
    AttributeInstance getAttribute​(Attribute attribute)
    Gets the specified attribute instance from the object.
  • Method Details

    • getAttribute

      @Nullable AttributeInstance getAttribute​(@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