Interface Llama

All Superinterfaces:
AbstractHorse, Ageable, Animals, Attributable, Audience, Breedable, ChestedHorse, CommandSender, Creature, Damageable, Entity, HoverEventSource<HoverEvent.ShowEntity>, InventoryHolder, LivingEntity, Lootable, Metadatable, Mob, Nameable, Permissible, PersistentDataHolder, Pointered, ProjectileSource, RangedEntity, ServerOperator, Sound.Emitter, Tameable, Vehicle
All Known Subinterfaces:
TraderLlama

public interface Llama extends ChestedHorse, RangedEntity
Represents a Llama.
  • Method Details

    • getColor

      Gets the llama's color.
      Returns:
      a Llama.Color representing the llama's color
    • setColor

      void setColor(@NotNull @NotNull Llama.Color color)
      Sets the llama's color.
      Parameters:
      color - a Llama.Color for this llama
    • getStrength

      int getStrength()
      Gets the llama's strength. A higher strength llama will have more inventory slots and be more threatening to entities.
      Returns:
      llama strength [1,5]
    • setStrength

      void setStrength(int strength)
      Sets the llama's strength. A higher strength llama will have more inventory slots and be more threatening to entities. Inventory slots are equal to strength * 3.
      Parameters:
      strength - llama strength [1,5]
    • getInventory

      Description copied from interface: InventoryHolder
      Get the object's inventory.
      Specified by:
      getInventory in interface AbstractHorse
      Specified by:
      getInventory in interface InventoryHolder
      Returns:
      The inventory.
    • shouldJoinCaravan

      boolean shouldJoinCaravan()
      Check if this Llama should attempt to join a caravan
      Returns:
      True if Llama is allowed to join a caravan
    • setShouldJoinCaravan

      void setShouldJoinCaravan(boolean shouldJoinCaravan)
      Set if this Llama should attempt to join a caravan
      Parameters:
      shouldJoinCaravan - True to allow joining a caravan
    • inCaravan

      boolean inCaravan()
      Check if Llama is in a caravan
      Returns:
      True if in caravan
    • joinCaravan

      void joinCaravan(@NotNull @NotNull Llama llama)
      Join a caravan
      Parameters:
      llama - Head of caravan to join
    • leaveCaravan

      void leaveCaravan()
      Leave current caravan if in one
    • hasCaravanTail

      boolean hasCaravanTail()
      Check if another Llama is following this Llama
      Returns:
      True if being followed in the caravan
    • getCaravanHead

      @Nullable @Nullable Llama getCaravanHead()
      Get the Llama that this Llama is following

      Does not necessarily mean the leader of the entire caravan

      Returns:
      The Llama being followed
    • getCaravanTail

      @Nullable @Nullable Llama getCaravanTail()
      Get the Llama following this Llama, if any
      Returns:
      The Llama following this one