Ageable
, Attributable
, CommandSender
, Creature
, Damageable
, Entity
, InventoryHolder
, LivingEntity
, Lootable
, Merchant
, Metadatable
, Mob
, Nameable
, NPC
, Permissible
, ProjectileSource
, ServerOperator
public interface Villager extends Ageable, NPC, InventoryHolder, Merchant
Modifier and Type | Interface | Description |
---|---|---|
static class |
Villager.Career |
The Career of this Villager.
|
static class |
Villager.Profession |
Represents the various different Villager professions there may be.
|
Modifier and Type | Method | 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, setBreed
getAttribute
damage, damage, getHealth, getMaxHealth, resetMaxHealth, setHealth, setMaxHealth
addPotionEffect, addPotionEffect, addPotionEffects, getActivePotionEffects, getCanPickupItems, getEquipment, getEyeHeight, getEyeHeight, getEyeLocation, getKiller, getLastDamage, getLastTwoTargetBlocks, getLeashHolder, getLineOfSight, getMaximumAir, getMaximumNoDamageTicks, getNoDamageTicks, getPotionEffect, getRemainingAir, getRemoveWhenFarAway, getTargetBlock, hasAI, hasLineOfSight, hasPotionEffect, isCollidable, isGliding, isLeashed, isRiptiding, isSwimming, removePotionEffect, setAI, setCanPickupItems, setCollidable, setGliding, setLastDamage, setLeashHolder, setMaximumAir, setMaximumNoDamageTicks, setNoDamageTicks, setRemainingAir, setRemoveWhenFarAway, setSwimming
getLootTable, getSeed, setLootTable, setSeed
getRecipe, getRecipeCount, getRecipes, getTrader, isTrading, setRecipe, setRecipes
launchProjectile, launchProjectile
Villager.Profession getProfession()
void setProfession(Villager.Profession profession)
profession
- New profession.Villager.Career getCareer()
Villager.Career
for this Villager.Villager.Career
void setCareer(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 onejava.lang.IllegalArgumentException
- when the new Villager.Career
cannot be
used with this Villager's current Villager.Profession
.void setCareer(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)java.lang.IllegalArgumentException
- when the new Villager.Career
cannot be
used with this Villager's current Villager.Profession
.Inventory getInventory()
getInventory
in interface InventoryHolder
int getRiches()
void setRiches(int riches)
riches
- the new richesgetRiches()
Copyright © 2018. All rights reserved.