public interface Villager extends Ageable, NPC, InventoryHolder, Merchant
| Modifier and Type | Interface and Description | 
|---|---|
static class  | 
Villager.Career
The Career of this Villager. 
 | 
static class  | 
Villager.Profession
Represents the various different Villager professions there may be. 
 | 
Entity.Spigot| Modifier and Type | Method and Description | 
|---|---|
Villager.Career | 
getCareer()
Get the current  
Villager.Career for this Villager. | 
Inventory | 
getInventory()
Gets this villager's inventory. 
 | 
Villager.Profession | 
getProfession()
Gets the current profession of this villager. 
 | 
int | 
getRiches()
Gets this villager's riches, the number of emeralds this villager has
 been given. 
 | 
void | 
setCareer(Villager.Career career)
Set the new  
Villager.Career for this Villager. | 
void | 
setCareer(Villager.Career career,
         boolean resetTrades)
Set the new  
Villager.Career for this Villager. | 
void | 
setProfession(Villager.Profession profession)
Sets the new profession of this villager. 
 | 
void | 
setRiches(int riches)
Sets this villager's riches. 
 | 
canBreed, getAge, getAgeLock, isAdult, setAdult, setAge, setAgeLock, setBaby, setBreedgetPathfinder, getTarget, isInDaylight, setTargetaddPotionEffect, addPotionEffect, addPotionEffects, getActiveItem, getActivePotionEffects, getArrowsStuck, getCanPickupItems, getEquipment, getEyeHeight, getEyeHeight, getEyeLocation, getHandRaisedTime, getItemUseRemainingTime, getKiller, getLastDamage, getLastTwoTargetBlocks, getLeashHolder, getLineOfSight, getMaximumAir, getMaximumNoDamageTicks, getNoDamageTicks, getPotionEffect, getRemainingAir, getRemoveWhenFarAway, getShieldBlockingDelay, getTargetBlock, getTargetBlock, getTargetBlock, getTargetBlockExact, getTargetBlockExact, getTargetBlockFace, getTargetBlockFace, getTargetBlockInfo, getTargetBlockInfo, getTargetEntity, getTargetEntity, getTargetEntityInfo, getTargetEntityInfo, hasAI, hasLineOfSight, hasPotionEffect, isCollidable, isGliding, isHandRaised, isLeashed, isRiptiding, isSwimming, rayTraceBlocks, rayTraceBlocks, removePotionEffect, setAI, setArrowsStuck, setCanPickupItems, setCollidable, setGliding, setKiller, setLastDamage, setLeashHolder, setMaximumAir, setMaximumNoDamageTicks, setNoDamageTicks, setRemainingAir, setRemoveWhenFarAway, setShieldBlockingDelay, setSwimminggetAttributedamage, damage, getHealth, getMaxHealth, resetMaxHealth, setHealth, setMaxHealthaddPassenger, addScoreboardTag, eject, fromMobSpawner, getBoundingBox, getChunk, getEntityId, getEntitySpawnReason, getFacing, getFallDistance, getFireTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getNearbyEntities, getOrigin, getPassenger, getPassengers, getPistonMoveReaction, getPortalCooldown, getScoreboardTags, getServer, getTicksLived, getType, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, hasGravity, isCustomNameVisible, isDead, isEmpty, isGlowing, isInsideVehicle, isInvulnerable, isOnGround, isPersistent, isSilent, isValid, leaveVehicle, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setPassenger, setPersistent, setPortalCooldown, setRotation, setSilent, setTicksLived, setVelocity, spigot, teleport, teleport, teleport, teleport, teleportAsync, teleportAsyncgetMetadata, hasMetadata, removeMetadata, setMetadatagetName, sendMessage, sendMessage, sendMessage, sendMessageaddAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, recalculatePermissions, removeAttachmentisOp, setOpgetCustomName, setCustomNamelaunchProjectile, launchProjectileclearLootTable, getLootTable, getSeed, hasLootTable, setLootTable, setLootTable, setSeedgetRecipe, getRecipeCount, getRecipes, getTrader, isTrading, setRecipe, setRecipes@NotNull Villager.Profession getProfession()
void setProfession(@NotNull
                   Villager.Profession profession)
profession - New profession.@NotNull Villager.Career getCareer()
Villager.Career for this Villager.Villager.Careervoid setCareer(@Nullable
               Villager.Career career)
Villager.Career for this Villager.
 This method will reset the villager's trades to the new career.career - the new career, or null to clear the career to a random oneIllegalArgumentException - when the new Villager.Career cannot be
 used with this Villager's current Villager.Profession.void setCareer(@Nullable
               Villager.Career career,
               boolean resetTrades)
Villager.Career for this Villager.career - the new career, or null to clear the career to a random oneresetTrades - true to reset this Villager's trades to the new
 career's (if any)IllegalArgumentException - when the new Villager.Career cannot be
 used with this Villager's current Villager.Profession.@NotNull Inventory getInventory()
getInventory in interface InventoryHolderint getRiches()
void setRiches(int riches)
riches - the new richesgetRiches()Copyright © 2022. All rights reserved.