接口 FallingBlock
- 所有超级接口:
CommandSender
,Entity
,Metadatable
,Nameable
,Permissible
,PersistentDataHolder
,ServerOperator
代表一个下落方块.
原文: Represents a falling block
-
嵌套类概要
从接口继承的嵌套类/接口 org.bukkit.entity.Entity
Entity.Spigot
-
方法概要
修饰符和类型方法说明boolean
获取此方块能否砸伤实体.Get the data for the falling blockfloat
Get the amount of damage inflicted upon entities multiplied by the distance that the block had fallen when this falling block lands on them.boolean
获取下落方块被阻挡时是否会变为掉落物.已过时。int
Get the maximum amount of damage that can be inflicted upon entities when this falling block lands on them.void
setDamagePerBlock
(float damage) Set the amount of damage inflicted upon entities multiplied by the distance that the block had fallen when this falling block lands on them.void
setDropItem
(boolean drop) 设置下落方块被阻挡时是否会变为掉落物.void
setHurtEntities
(boolean hurtEntities) 设置此方块能否砸伤实体.void
setMaxDamage
(int damage) Set the maximum amount of damage that can be inflicted upon entities when this falling block lands on them.从接口继承的方法 org.bukkit.command.CommandSender
getName, sendMessage, sendMessage, sendMessage, sendMessage
从接口继承的方法 org.bukkit.entity.Entity
addPassenger, addScoreboardTag, eject, 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, getType, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, hasGravity, isCustomNameVisible, isDead, isEmpty, isFrozen, isGlowing, isInsideVehicle, isInvulnerable, isInWater, 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.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.permissions.ServerOperator
isOp, setOp
-
方法详细资料
-
getMaterial
已过时。请使用getBlockData()
获取下落方块的类型.原文: Get the Material of the falling block
- 返回:
- Material of the block
-
getBlockData
Get the data for the falling block- 返回:
- data of the block
-
getDropItem
boolean getDropItem()获取下落方块被阻挡时是否会变为掉落物.原文: Get if the falling block will break into an item if it cannot be placed
- 返回:
- 方块在被阻挡时是否会变为掉落物.
-
setDropItem
void setDropItem(boolean drop) 设置下落方块被阻挡时是否会变为掉落物.原文: Set if the falling block will break into an item if it cannot be placed
- 参数:
drop
- 当被阻挡时变为掉落物时返回 true.
-
canHurtEntities
boolean canHurtEntities()获取此方块能否砸伤实体.原文: Get the HurtEntities state of this block.
- 返回:
- 此方块能否砸伤实体.
-
setHurtEntities
void setHurtEntities(boolean hurtEntities) 设置此方块能否砸伤实体.原文: Set the HurtEntities state of this block.
- 参数:
hurtEntities
- 此方块能否砸伤实体.
-
getDamagePerBlock
float getDamagePerBlock()Get the amount of damage inflicted upon entities multiplied by the distance that the block had fallen when this falling block lands on them.- 返回:
- the damage per block
-
setDamagePerBlock
void setDamagePerBlock(float damage) Set the amount of damage inflicted upon entities multiplied by the distance that the block had fallen when this falling block lands on them.If
damage
is non-zero, this method will automatically callsetHurtEntities(true)
.- 参数:
damage
- the damage per block to set. Must be >= 0.0
-
getMaxDamage
int getMaxDamage()Get the maximum amount of damage that can be inflicted upon entities when this falling block lands on them.- 返回:
- the max damage
-
setMaxDamage
void setMaxDamage(int damage) Set the maximum amount of damage that can be inflicted upon entities when this falling block lands on them.If
damage
is non-zero, this method will automatically callsetHurtEntities(true)
.- 参数:
damage
- the max damage to set. Must be >= 0
-
getBlockData()