Interface WanderingTrader

All Superinterfaces:
AbstractVillager, Ageable, Attributable, net.kyori.adventure.audience.Audience, Breedable, CommandSender, Creature, Damageable, Entity, net.kyori.adventure.text.event.HoverEventSource<net.kyori.adventure.text.event.HoverEvent.ShowEntity>, InventoryHolder, LivingEntity, Lootable, Merchant, Metadatable, Mob, Nameable, NPC, Permissible, PersistentDataHolder, net.kyori.adventure.pointer.Pointered, ProjectileSource, ServerOperator

public interface WanderingTrader extends AbstractVillager
Represents a wandering trader NPC
  • Method Details

    • getDespawnDelay

      int getDespawnDelay()
      Gets the despawn delay before this WanderingTrader is forcibly despawned. If this is less than or equal to 0, then the trader will not be despawned.
      Returns:
      The despawn delay before this WanderingTrader is forcibly despawned
    • setDespawnDelay

      void setDespawnDelay(int despawnDelay)
      Sets the despawn delay before this WanderingTrader is forcibly despawned. If this is less than or equal to 0, then the trader will not be despawned.
      Parameters:
      despawnDelay - The new despawn delay before this WanderingTrader is forcibly despawned
    • setCanDrinkPotion

      void setCanDrinkPotion(boolean bool)
      Set if the Wandering Trader can and will drink an invisibility potion.
      Parameters:
      bool - whether the mob will drink
    • canDrinkPotion

      boolean canDrinkPotion()
      Get if the Wandering Trader can and will drink an invisibility potion.
      Returns:
      whether the mob will drink
    • setCanDrinkMilk

      void setCanDrinkMilk(boolean bool)
      Set if the Wandering Trader can and will drink milk.
      Parameters:
      bool - whether the mob will drink
    • canDrinkMilk

      boolean canDrinkMilk()
      Get if the Wandering Trader can and will drink milk.
      Returns:
      whether the mob will drink