接口 Piglin
- 所有超级接口:
Ageable
,Attributable
,CommandSender
,Creature
,Damageable
,Enemy
,Entity
,InventoryHolder
,LivingEntity
,Lootable
,Metadatable
,Mob
,Monster
,Nameable
,Permissible
,PersistentDataHolder
,PiglinAbstract
,ProjectileSource
,ServerOperator
Represents a Piglin.
-
嵌套类概要
从接口继承的嵌套类/接口 org.bukkit.entity.Entity
Entity.Spigot
-
方法概要
修饰符和类型方法说明boolean
addBarterMaterial
(@NotNull Material material) Adds a material to the allowed list of materials to barter with.boolean
addMaterialOfInterest
(@NotNull Material material) Adds a material the piglin will pickup and store in his inventory.Returns a immutable set of materials the piglins will barter with.Returns a immutable set of materials the piglins will pickup.boolean
Get whether the piglin is able to hunt hoglins.boolean
removeBarterMaterial
(@NotNull Material material) Removes a material from the allowed list of materials to barter with.boolean
removeMaterialOfInterest
(@NotNull Material material) Removes a material from the list of materials the piglin will pickup.void
setIsAbleToHunt
(boolean flag) Sets whether the piglin is able to hunt hoglins.从接口继承的方法 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.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, getLeashHolder, getLineOfSight, getMaximumAir, getMaximumNoDamageTicks, getMemory, getNoActionTicks, getNoDamageTicks, getPotionEffect, getRemainingAir, getRemoveWhenFarAway, getTargetBlock, getTargetBlockExact, getTargetBlockExact, hasAI, hasLineOfSight, hasPotionEffect, isClimbing, isCollidable, isGliding, isInvisible, isLeashed, isRiptiding, isSleeping, isSwimming, playHurtAnimation, rayTraceBlocks, rayTraceBlocks, removePotionEffect, setAI, setArrowCooldown, setArrowsInBody, setCanPickupItems, setCollidable, setGliding, setInvisible, setItemInUseTicks, setLastDamage, setLeashHolder, setMaximumAir, setMaximumNoDamageTicks, setMemory, setNoActionTicks, setNoDamageTicks, setRemainingAir, setRemoveWhenFarAway, setSwimming, 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.- 返回:
- Whether the piglin is able to hunt hoglins
-
setIsAbleToHunt
void setIsAbleToHunt(boolean flag) Sets whether the piglin is able to hunt hoglins.- 参数:
flag
- Whether the piglin is able to hunt hoglins.
-
addBarterMaterial
Adds a material to the allowed list of materials to barter with.- 参数:
material
- The material to add- 返回:
- true if the item has been added successfully, false otherwise
-
removeBarterMaterial
Removes a material from the allowed list of materials to barter with. Note: It's not possible to override the default bartering item gold_ingots as payment. To block gold_ingots seePiglinBarterEvent
.- 参数:
material
- The material to remove- 返回:
- true if the item has been removed successfully, false otherwise
-
addMaterialOfInterest
Adds a material the piglin will pickup and store in his inventory.- 参数:
material
- The material you want the piglin to be interested in- 返回:
- true if the item has been added successfully, false otherwise
-
removeMaterialOfInterest
Removes a material from the list of materials the piglin will pickup. Note: It's not possible to override the default list of item the piglin will pickup. To cancel pickup seeEntityPickupItemEvent
.- 参数:
material
- The material you want removed from the interest list- 返回:
- true if the item has been removed successfully, false otherwise
-
getInterestList
Returns a immutable set of materials the piglins will pickup.
Note: This set will not include the items that are set by default. To interact with those items seeEntityPickupItemEvent
.- 返回:
- An immutable materials set
-
getBarterList
Returns a immutable set of materials the piglins will barter with. Note: This set will not include the items that are set by default. To interact with those items seePiglinBarterEvent
.- 返回:
- An immutable materials set
-