Class TameableAnimalMock

All Implemented Interfaces:
MessageTarget, io.papermc.paper.entity.Frictional, net.kyori.adventure.audience.Audience, net.kyori.adventure.pointer.Pointered, net.kyori.adventure.sound.Sound.Emitter, net.kyori.adventure.text.event.HoverEventSource<net.kyori.adventure.text.event.HoverEvent.ShowEntity>, org.bukkit.attribute.Attributable, org.bukkit.command.CommandSender, org.bukkit.entity.Ageable, org.bukkit.entity.Animals, org.bukkit.entity.Breedable, org.bukkit.entity.Creature, org.bukkit.entity.Damageable, org.bukkit.entity.Entity, org.bukkit.entity.LivingEntity, org.bukkit.entity.Mob, org.bukkit.entity.Tameable, org.bukkit.loot.Lootable, org.bukkit.metadata.Metadatable, org.bukkit.Nameable, org.bukkit.permissions.Permissible, org.bukkit.permissions.ServerOperator, org.bukkit.persistence.PersistentDataHolder, org.bukkit.projectiles.ProjectileSource
Direct Known Subclasses:
CatMock, WolfMock

public class TameableAnimalMock extends AnimalsMock implements org.bukkit.entity.Tameable, org.bukkit.entity.Creature
Mock implementation of a Tameable Creature.
See Also:
  • Constructor Details

    • TameableAnimalMock

      public TameableAnimalMock(@NotNull @NotNull ServerMock server, @NotNull @NotNull UUID uuid)
      Constructs a new on the provided ServerMock with a specified UUID.
      Parameters:
      server - The server to create the entity on.
      uuid - The UUID of the entity.
  • Method Details

    • setOwnerUUID

      public void setOwnerUUID(@Nullable @Nullable UUID uuid)
      Sets the owner of this animal by UUID.
      Parameters:
      uuid - The UUID.
      See Also:
    • getOwner

      public org.bukkit.entity.AnimalTamer getOwner()
      Specified by:
      getOwner in interface org.bukkit.entity.Tameable
    • isTamed

      public boolean isTamed()
      Specified by:
      isTamed in interface org.bukkit.entity.Tameable
    • setOwner

      public void setOwner(@Nullable @Nullable org.bukkit.entity.AnimalTamer tamer)
      Specified by:
      setOwner in interface org.bukkit.entity.Tameable
    • setTamed

      public void setTamed(boolean tame)
      Specified by:
      setTamed in interface org.bukkit.entity.Tameable
    • getOwnerUniqueId

      @Nullable public @Nullable UUID getOwnerUniqueId()
      Specified by:
      getOwnerUniqueId in interface org.bukkit.entity.Tameable
    • isSitting

      public boolean isSitting()
      Checks if the animal is sitting.
      Returns:
      Whether the animal is sitting.
      Throws:
      IllegalStateException - If the animal doesn't implement Sittable.
      See Also:
      • Sittable.isSitting()
    • setSitting

      public void setSitting(boolean sitting)
      Sets whether the animal is sitting.
      Parameters:
      sitting - Whether the animal is sitting.
      Throws:
      IllegalStateException - If the animal doesn't implement Sittable.
      See Also:
      • Sittable.setSitting(boolean)
    • toString

      @NotNull public @NotNull String toString()
      Overrides:
      toString in class AnimalsMock