接口 Piglin
- 所有超级接口:
Ageable,Attributable,CommandSender,Creature,Damageable,Enemy,Entity,InventoryHolder,Leashable,LivingEntity,Lootable,Metadatable,Mob,Monster,Nameable,Permissible,PersistentDataHolder,PiglinAbstract,ProjectileSource,ServerOperator
代表一只猪灵。
-
嵌套类概要
从接口继承的嵌套类/接口 org.bukkit.entity.Entity
Entity.Spigot -
方法概要
修饰符和类型方法说明booleanaddBarterMaterial(@NotNull Material material) 添加一个材料到允许以物易物的材料列表中。booleanaddMaterialOfInterest(@NotNull Material material) 添加一个猪灵会拾取并存储在其物品栏中的材料。返回猪灵会以物易物的材料的不可变集合。返回猪灵会拾取的材料的不可变集合。boolean获取猪灵是否能猎杀疣猪兽。booleanremoveBarterMaterial(@NotNull Material material) 从允许以物易物的材料列表中移除一个材料。booleanremoveMaterialOfInterest(@NotNull Material material) 从猪灵会拾取的材料列表中移除一个材料。voidsetIsAbleToHunt(boolean flag) 设置猪灵是否能猎杀疣猪兽。从接口继承的方法 org.bukkit.entity.Ageable
canBreed, getAge, getAgeLock, isAdult, setAdult, setAge, setAgeLock, setBaby, setBreed从接口继承的方法 org.bukkit.attribute.Attributable
getAttribute从接口继承的方法 org.bukkit.command.CommandSender
getName, sendMessage, sendMessage, sendMessage, sendMessage从接口继承的方法 org.bukkit.entity.Damageable
damage, damage, damage, getAbsorptionAmount, getHealth, getMaxHealth, resetMaxHealth, setAbsorptionAmount, setHealth, setMaxHealth从接口继承的方法 org.bukkit.entity.Entity
addPassenger, addScoreboardTag, copy, copy, createSnapshot, eject, getAsString, getBoundingBox, getEntityId, getFacing, getFallDistance, getFireTicks, getFreezeTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getMaxFreezeTicks, getNearbyEntities, getPassenger, getPassengers, getPistonMoveReaction, getPortalCooldown, getPose, getScoreboardTags, getServer, getSpawnCategory, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTicksLived, getTrackedBy, getType, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, hasGravity, isCustomNameVisible, isDead, isEmpty, isFrozen, isGlowing, isInsideVehicle, isInvulnerable, isInWater, isInWorld, isOnGround, isPersistent, isSilent, isValid, isVisibleByDefault, isVisualFire, leaveVehicle, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setFreezeTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setPassenger, setPersistent, setPortalCooldown, setRotation, setSilent, setTicksLived, setVelocity, setVisibleByDefault, setVisualFire, spigot, teleport, teleport, teleport, teleport从接口继承的方法 org.bukkit.inventory.InventoryHolder
getInventory从接口继承的方法 org.bukkit.entity.Leashable
getLeashHolder, isLeashed, setLeashHolder从接口继承的方法 org.bukkit.entity.LivingEntity
addPotionEffect, addPotionEffect, addPotionEffects, attack, canBreatheUnderwater, getActivePotionEffects, getArrowCooldown, getArrowsInBody, getCanPickupItems, getCategory, getCollidableExemptions, getDeathSound, getDrinkingSound, getEatingSound, getEquipment, getEyeHeight, getEyeHeight, getEyeLocation, getFallDamageSound, getFallDamageSoundBig, getFallDamageSoundSmall, getHurtSound, getItemInUse, getItemInUseTicks, getKiller, getLastDamage, getLastTwoTargetBlocks, getLineOfSight, getMaximumAir, getMaximumNoDamageTicks, getMemory, getNoActionTicks, getNoDamageTicks, getPotionEffect, getRemainingAir, getRemoveWhenFarAway, getTargetBlock, getTargetBlockExact, getTargetBlockExact, getWaypointColor, getWaypointStyle, hasAI, hasLineOfSight, hasPotionEffect, isClimbing, isCollidable, isGliding, isInvisible, isRiptiding, isSleeping, isSwimming, playHurtAnimation, rayTraceBlocks, rayTraceBlocks, removePotionEffect, setAI, setArrowCooldown, setArrowsInBody, setCanPickupItems, setCollidable, setGliding, setInvisible, setItemInUseTicks, setLastDamage, setMaximumAir, setMaximumNoDamageTicks, setMemory, setNoActionTicks, setNoDamageTicks, setRemainingAir, setRemoveWhenFarAway, setRiptiding, setSwimming, setWaypointColor, setWaypointStyle, swingMainHand, swingOffHand从接口继承的方法 org.bukkit.loot.Lootable
getLootTable, getSeed, setLootTable, setSeed从接口继承的方法 org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadata从接口继承的方法 org.bukkit.Nameable
getCustomName, setCustomName从接口继承的方法 org.bukkit.permissions.Permissible
addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, recalculatePermissions, removeAttachment从接口继承的方法 org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainer从接口继承的方法 org.bukkit.entity.PiglinAbstract
getConversionTime, isBaby, isConverting, isImmuneToZombification, setBaby, setConversionTime, setImmuneToZombification从接口继承的方法 org.bukkit.projectiles.ProjectileSource
launchProjectile, launchProjectile从接口继承的方法 org.bukkit.permissions.ServerOperator
isOp, setOp
-
方法详细资料
-
isAbleToHunt
boolean isAbleToHunt()获取猪灵是否能猎杀疣猪兽。原文:Get whether the piglin is able to hunt hoglins.
- 返回:
- 猪灵是否能猎杀疣猪兽
-
setIsAbleToHunt
void setIsAbleToHunt(boolean flag) 设置猪灵是否能猎杀疣猪兽。原文:Sets whether the piglin is able to hunt hoglins.
- 参数:
flag- 猪灵是否能猎杀疣猪兽
-
addBarterMaterial
添加一个材料到允许以物易物的材料列表中。原文:Adds a material to the allowed list of materials to barter with.
- 参数:
material- 要添加的材料- 返回:
- 如果物品已成功添加则为 true,否则为 false
-
removeBarterMaterial
从允许以物易物的材料列表中移除一个材料。原文:Removes a material from the allowed list of materials to barter with. 注意:无法覆盖默认的以物易物物品金锭作为支付物。要屏蔽金锭请参见
PiglinBarterEvent。- 参数:
material- 要移除的材料- 返回:
- 如果物品已成功移除则为 true,否则为 false
-
addMaterialOfInterest
添加一个猪灵会拾取并存储在其物品栏中的材料。原文:Adds a material the piglin will pickup and store in his inventory.
- 参数:
material- 你希望猪灵感兴趣的材料- 返回:
- 如果物品已成功添加则为 true,否则为 false
-
removeMaterialOfInterest
从猪灵会拾取的材料列表中移除一个材料。原文:Removes a material from the list of materials the piglin will pickup. 注意:无法覆盖猪灵默认拾取的物品列表。要取消拾取请参见
EntityPickupItemEvent。- 参数:
material- 你希望从兴趣列表中移除的材料- 返回:
- 如果物品已成功移除则为 true,否则为 false
-
getInterestList
返回猪灵会拾取的材料的不可变集合。原文:Returns a immutable set of materials the piglins will pickup.
注意:此集合不包含默认设置的物品。要操作那些物品请参见EntityPickupItemEvent。- 返回:
- 一个不可变的材料集合
-
getBarterList
返回猪灵会以物易物的材料的不可变集合。原文:Returns a immutable set of materials the piglins will barter with. 注意:此集合不包含默认设置的物品。要操作那些物品请参见
PiglinBarterEvent。- 返回:
- 一个不可变的材料集合
-