public class GlowVillager extends GlowAgeable implements org.bukkit.entity.Villager
height, widthdeathTicks, health, maxHealth, movement, speed, taskManageractive, airDrag, applyDragBeforeAccel, boundingBox, ENTITY_ID_NOBODY, entityId, gravityAccel, liquidDrag, location, metadata, passengerChanged, previousLocation, removed, server, slipMultiplier, teleported, ticksLived, vehicle, velocity, velocityChanged, world, worldLock| Constructor and Description |
|---|
GlowVillager(org.bukkit.Location location)
Creates a villager with a random profession.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearRecipes()
Clears the recipes of this villager.
|
void |
damage(double amount,
org.bukkit.entity.Entity source,
org.bukkit.event.entity.EntityDamageEvent.DamageCause cause) |
boolean |
entityInteract(GlowPlayer player,
InteractEntityMessage message) |
protected org.bukkit.Sound |
getAmbientSound()
Get the ambient sound this entity makes randomly, or null for silence.
|
org.bukkit.entity.Villager.Career |
getCareer() |
static org.bukkit.entity.Villager.Career |
getCareerById(int id,
org.bukkit.entity.Villager.Profession profession)
Gets the career associated with a given ID and profession.
|
static int |
getCareerId(org.bukkit.entity.Villager.Career career)
Gets the numerical ID of the given career.
|
int |
getCareerLevel()
Get the current level of this villager's trading options.
|
protected org.bukkit.Sound |
getDeathSound()
Get the death sound of this entity, or null for silence.
|
protected org.bukkit.Sound |
getHurtSound()
Get the hurt sound of this entity, or null for silence.
|
org.bukkit.inventory.Inventory |
getInventory() |
org.bukkit.entity.Villager.Profession |
getProfession() |
static org.bukkit.entity.Villager.Profession |
getProfessionById(int professionId)
Gets the
Villager.Profession corresponding to the given ID. |
static org.bukkit.entity.Villager.Profession |
getRandomProfession(Random random)
Gets a random
Villager.Profession. |
org.bukkit.inventory.MerchantRecipe |
getRecipe(int index) |
int |
getRecipeCount() |
List<org.bukkit.inventory.MerchantRecipe> |
getRecipes() |
int |
getRiches() |
GlowHumanEntity |
getTrader()
The trader this villager is currently trading with.
|
boolean |
isTrading() |
static boolean |
isValidProfession(int professionId)
Checks whether or not the given
Villager.Profession ID is valid. |
boolean |
isWilling()
Whether or not this villager is willing to mate.
|
void |
setCareer(org.bukkit.entity.Villager.Career career) |
void |
setCareer(org.bukkit.entity.Villager.Career career,
boolean resetTrades) |
void |
setCareerLevel(int careerLevel)
Set the current level of this villager's trading options.
|
void |
setProfession(org.bukkit.entity.Villager.Profession profession) |
void |
setRecipe(int index,
org.bukkit.inventory.MerchantRecipe recipe) |
void |
setRecipes(List<org.bukkit.inventory.MerchantRecipe> recipes) |
void |
setRiches(int riches) |
void |
setTrader(GlowHumanEntity trader)
The trader this villager is currently trading with.
|
void |
setWilling(boolean willing)
Whether or not this villager is willing to mate.
|
canBreed, canGrow, computeGrowthAmount, createBaby, createSpawnMessage, getAge, getAgeLock, getForcedAge, getInLove, getParent, getSoundPitch, grow, isAdult, pulse, setAdult, setAge, setAgeLock, setBaby, setBreed, setForcedAge, setInLove, setParent, setScale, setScaleForAgegetTarget, getType, setTargetaddPotionEffect, addPotionEffect, addPotionEffects, canTakeDamage, clearActivePotionEffects, createUpdateMessage, getActiveItem, getActivePotionEffects, getAmbientDelay, getArrowsStuck, getAttribute, getAttributeManager, getCanPickupItems, getDeathTicks, getEquipment, getEquipmentMonitor, getEyeHeight, getEyeHeight, getEyeLocation, getHandRaisedTime, getHeadYaw, getHealth, getItemUseRemainingTime, getKiller, getLastDamage, getLastDamager, getLastTwoTargetBlocks, getLastTwoTargetBlocks, getLineOfSight, getMaxHealth, getMaximumAir, getMaximumNoDamageTicks, getMovement, getNoDamageTicks, getPlayerDamageTick, getPotionEffect, getRemainingAir, getRemoveWhenFarAway, getShieldBlockingDelay, getSoundVolume, getSpeed, getState, getTargetBlock, getTargetBlock, getTaskManager, getVelocityFromMovement, hasAI, hasLineOfSight, hasPotionEffect, isArthropod, isCollidable, isFallFlying, isGliding, isHandRaised, isUndead, isWithinSolidBlock, jump, launchProjectile, launchProjectile, launchProjectile, launchProjectile, playAnimation, pulsePhysics, removePotionEffect, reset, resetMaxHealth, setAI, setArrowsStuck, setCanPickupItems, setCollidable, setFallFlying, setGliding, setHeadYaw, setHealth, setKiller, setLastDamage, setLastDamager, setMaxHealth, setMaximumAir, setMaximumNoDamageTicks, setMovement, setNoDamageTicks, setOnGround, setPlayerDamageTick, setRemainingAir, setRemoveWhenFarAway, setShieldBlockingDelay, setSpeed, setState, tryUseTotem, updatePotionEffectsMetadataaddAttachment, addAttachment, addAttachment, addAttachment, addPassenger, addScoreboardTag, collide, createAfterSpawnMessage, damage, damage, damage, eject, equals, fromMobSpawner, getCardinalFacing, getChunk, getCustomName, getCustomTags, getDismountLocation, getEffectivePermissions, getEntityId, getFacing, getFallDistance, getFireTicks, getGravityAccel, getHeight, getLastDamageCause, getLeashedEntities, getLeashHolder, getLocation, getLocation, getMaxFireTicks, getMetadata, getMetadata, getMountLocation, getName, getNearbyEntities, getOrigin, getPassenger, getPassengers, getPistonMoveReaction, getPortalCooldown, getScoreboardTags, getServer, getTicksLived, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, hasDefaultLandingBehavior, hasFriction, hasGravity, hashCode, hasMetadata, hasMoved, hasPermission, hasPermission, hasRotated, intersects, isCustomNameVisible, isDead, isEmpty, isGlowing, isInsideVehicle, isInvulnerable, isLeashed, isOnGround, isOp, isPermissionSet, isPermissionSet, isRemoved, isSilent, isTeleported, isTouchingMaterial, isValid, isWithinDistance, isWithinDistance, leaveVehicle, playEffect, playEffectKnownAndSelf, recalculatePermissions, remove, removeAttachment, removeMetadata, removePassenger, removeScoreboardTag, sendMessage, sendMessage, setAirDrag, setApplyDragBeforeAccel, setBoundingBox, setCustomName, setCustomNameVisible, setFallDistance, setFireTicks, setFriction, setGlowing, setGravity, setGravityAccel, setInvulnerable, setLastDamageCause, setLeashHolder, setLeashHolderUniqueId, setLiquidDrag, setMetadata, setOp, setPassenger, setPortalCooldown, setRawLocation, setRawLocation, setSilent, setSize, setTicksLived, setUniqueId, setVelocity, shouldSave, spigot, teleport, teleport, teleport, teleport, teleportToEnd, teleportToSpawn, toString, updateBoundingBoxclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic GlowVillager(org.bukkit.Location location)
location - the locationpublic org.bukkit.entity.Villager.Profession getProfession()
getProfession in interface org.bukkit.entity.Villagerpublic void setProfession(org.bukkit.entity.Villager.Profession profession)
setProfession in interface org.bukkit.entity.Villagerpublic void setCareer(org.bukkit.entity.Villager.Career career)
setCareer in interface org.bukkit.entity.Villagerpublic void setCareer(org.bukkit.entity.Villager.Career career,
boolean resetTrades)
setCareer in interface org.bukkit.entity.Villagerpublic List<org.bukkit.inventory.MerchantRecipe> getRecipes()
getRecipes in interface org.bukkit.inventory.Merchantpublic void setRecipes(List<org.bukkit.inventory.MerchantRecipe> recipes)
setRecipes in interface org.bukkit.inventory.Merchantpublic org.bukkit.inventory.MerchantRecipe getRecipe(int index)
throws IndexOutOfBoundsException
getRecipe in interface org.bukkit.inventory.MerchantIndexOutOfBoundsExceptionpublic void setRecipe(int index,
org.bukkit.inventory.MerchantRecipe recipe)
throws IndexOutOfBoundsException
setRecipe in interface org.bukkit.inventory.MerchantIndexOutOfBoundsExceptionpublic int getRecipeCount()
getRecipeCount in interface org.bukkit.inventory.Merchantpublic void clearRecipes()
public org.bukkit.inventory.Inventory getInventory()
getInventory in interface org.bukkit.entity.VillagergetInventory in interface org.bukkit.inventory.InventoryHolderpublic boolean isTrading()
isTrading in interface org.bukkit.inventory.Merchantpublic void setCareerLevel(int careerLevel)
If 0, the next trade will assign a new career and set the career level to 1.
careerLevel - the level of this villager's trading optionspublic boolean entityInteract(GlowPlayer player, InteractEntityMessage message)
entityInteract in class GlowAgeableprotected org.bukkit.Sound getHurtSound()
GlowLivingEntitygetHurtSound in class GlowLivingEntityprotected org.bukkit.Sound getDeathSound()
GlowLivingEntitygetDeathSound in class GlowLivingEntityprotected org.bukkit.Sound getAmbientSound()
GlowLivingEntitygetAmbientSound in class GlowLivingEntitypublic void damage(double amount,
org.bukkit.entity.Entity source,
org.bukkit.event.entity.EntityDamageEvent.DamageCause cause)
damage in interface org.bukkit.entity.Damageabledamage in class GlowLivingEntitypublic static org.bukkit.entity.Villager.Career getCareerById(int id,
org.bukkit.entity.Villager.Profession profession)
id - the id of the careerprofession - the professionpublic static int getCareerId(org.bukkit.entity.Villager.Career career)
career - the careerpublic static org.bukkit.entity.Villager.Profession getRandomProfession(Random random)
Villager.Profession.random - the random instanceVillager.Professionpublic static boolean isValidProfession(int professionId)
Villager.Profession ID is valid.professionId - the ID of the Villager.Professionpublic static org.bukkit.entity.Villager.Profession getProfessionById(int professionId)
Villager.Profession corresponding to the given ID.professionId - the ID of the Villager.ProfessionVillager.Profession, or null if none existspublic org.bukkit.entity.Villager.Career getCareer()
getCareer in interface org.bukkit.entity.Villagerpublic int getRiches()
getRiches in interface org.bukkit.entity.Villagerpublic void setRiches(int riches)
setRiches in interface org.bukkit.entity.Villagerpublic GlowHumanEntity getTrader()
getTrader in interface org.bukkit.inventory.Merchantpublic void setTrader(GlowHumanEntity trader)
trader - the traderpublic boolean isWilling()
public void setWilling(boolean willing)
willing - true if this villager is willing to mate, false otherwisepublic int getCareerLevel()
Copyright © 2021. All rights reserved.