接口 Allay
- 所有超级接口:
Attributable,CommandSender,Creature,Damageable,Entity,InventoryHolder,Leashable,LivingEntity,Lootable,Metadatable,Mob,Nameable,Permissible,PersistentDataHolder,ProjectileSource,ServerOperator
-
嵌套类概要
从接口继承的嵌套类/接口 org.bukkit.entity.Entity
Entity.Spigot -
方法概要
修饰符和类型方法说明boolean获取悦灵是否可以复制.使当前悦灵复制自身, 无需跳舞或物品.long获取悦灵复制的冷却时间.获取悦灵正在跳舞的唱片机.boolean获取悦灵是否正在跳舞.void重置复制的冷却时间.voidsetCanDuplicate(boolean canDuplicate) 设置悦灵是否可以复制.voidsetDuplicationCooldown(long cooldown) 设置悦灵再次复制前的冷却时间.void强制设置悦灵的跳舞状态.voidstartDancing(@NotNull Location location) 使悦灵因指定的唱片机位置而开始跳舞.void使悦灵停止跳舞.从接口继承的方法 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.projectiles.ProjectileSource
launchProjectile, launchProjectile从接口继承的方法 org.bukkit.permissions.ServerOperator
isOp, setOp
-
方法详细资料
-
canDuplicate
boolean canDuplicate()获取悦灵是否可以复制.
注意: 复制取决于getDuplicationCooldown()是否小于零.原文:Gets if the allay can duplicate.
Note: Duplication is based when thegetDuplicationCooldown()its lower than zero.- 返回:
- 悦灵是否可以复制自身.
-
setCanDuplicate
void setCanDuplicate(boolean canDuplicate) 设置悦灵是否可以复制.
注意: 此值可能会被getDuplicationCooldown()覆盖, 如果冷却时间小于零. 你也可以使用setDuplicationCooldown(long)来允许悦灵复制.原文:Sets if the allay can duplicate.
Note: this value can be overridden later bygetDuplicationCooldown()if is lower than zero. You can also usesetDuplicationCooldown(long)to allow the allay to duplicate- 参数:
canDuplicate- 悦灵是否可以复制自身
-
getDuplicationCooldown
long getDuplicationCooldown()获取悦灵复制的冷却时间.原文:Gets the cooldown for duplicating the allay.
- 返回:
- 悦灵可以复制的时间 (以 tick 为单位)
-
setDuplicationCooldown
void setDuplicationCooldown(long cooldown) 设置悦灵再次复制前的冷却时间.原文:Sets the cooldown before the allay can duplicate again.
- 参数:
cooldown- 冷却时间, 使用负数来阻止悦灵再次复制.
-
resetDuplicationCooldown
void resetDuplicationCooldown()重置复制的冷却时间. 这会将冷却时间设置为与悦灵复制后相同的值.原文:Reset the cooldown for duplication. This will set the cooldown ticks to the same value as is set after an Allay has duplicated.
-
isDancing
boolean isDancing()获取悦灵是否正在跳舞.原文:Gets if the allay is dancing.
- 返回:
True如果正在跳舞, 否则为 false.
-
startDancing
使悦灵因指定的唱片机位置而开始跳舞.原文:Causes the allay to start dancing because of the provided jukebox location.
- 参数:
location- 唱片机的位置- 抛出:
IllegalArgumentException- 如果该位置的方块不是唱片机
-
startDancing
void startDancing()强制设置悦灵的跳舞状态.
注意: 此方法强制悦灵跳舞, 忽略附近是否有唱片机.原文:Force sets the dancing status of the allay.
Note: This method forces the allay to dance, ignoring any nearby jukebox being required. -
stopDancing
void stopDancing()使悦灵停止跳舞.原文:Makes the allay stop dancing.
-
duplicateAllay
使当前悦灵复制自身, 无需跳舞或物品. 注意: 这将触发CreatureSpawnEvent原文:This make the current allay duplicate itself without dance or item necessary. Note: this will fire a
CreatureSpawnEvent- 返回:
- 新的
Allay实体, 如果生成被取消则返回 null
-
getJukebox
获取悦灵正在跳舞的唱片机.原文:Gets the jukebox the allay is set to dance to.
- 返回:
- 唱片机的位置 (如果存在)
-