接口 EnderSignal
- 所有超级接口:
CommandSender,Entity,Metadatable,Nameable,Permissible,ServerOperator
Represents an EnderSignal, which is created upon throwing an ender eye.
-
方法概要
修饰符和类型方法说明intGets the amount of time this entity has been alive (in ticks).booleanGets if the EnderSignal should drop an item on death.
Iftrue, it will drop an item.Get the location this EnderSignal is moving towards.voidsetDespawnTimer(int timer) Set how long this entity has been alive (in ticks).voidsetDropItem(boolean drop) Sets if the EnderSignal should drop an item on death; or if it should shatter.voidsetTargetLocation(Location location) Set theLocationthis EnderSignal is moving towards.从接口继承的方法 org.bukkit.command.CommandSender
getName, sendMessage, sendMessage从接口继承的方法 org.bukkit.entity.Entity
addPassenger, addScoreboardTag, eject, getEntityId, getFallDistance, getFireTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getNearbyEntities, getPassenger, getPassengers, getPistonMoveReaction, getPortalCooldown, getScoreboardTags, getServer, getTicksLived, getType, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, hasGravity, isCustomNameVisible, isDead, isEmpty, isGlowing, isInsideVehicle, isInvulnerable, isOnGround, isSilent, isValid, leaveVehicle, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setPassenger, setPortalCooldown, setSilent, setTicksLived, setVelocity, 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.permissions.ServerOperator
isOp, setOp
-
方法详细资料
-
getTargetLocation
Location getTargetLocation()Get the location this EnderSignal is moving towards.- 返回:
- the
Locationthis EnderSignal is moving towards.
-
setTargetLocation
Set theLocationthis EnderSignal is moving towards.
When setting a new target location, thegetDropItem()resets to a random value and the despawn timer gets set back to 0.- 参数:
location- the new target location
-
getDropItem
boolean getDropItem()Gets if the EnderSignal should drop an item on death.
Iftrue, it will drop an item. Iffalse, it will shatter.- 返回:
- true if the EnderSignal will drop an item on death, or false if it will shatter
-
setDropItem
void setDropItem(boolean drop) Sets if the EnderSignal should drop an item on death; or if it should shatter.- 参数:
drop- true if the EnderSignal should drop an item on death, or false if it should shatter.
-
getDespawnTimer
int getDespawnTimer()Gets the amount of time this entity has been alive (in ticks).
When this number is greater than 80, it will despawn on the next tick.- 返回:
- the number of ticks this EnderSignal has been alive.
-
setDespawnTimer
void setDespawnTimer(int timer) Set how long this entity has been alive (in ticks).
When this number is greater than 80, it will despawn on the next tick.- 参数:
timer- how long (in ticks) this EnderSignal has been alive.
-