Package org.bukkit.entity
Interface EnderSignal
- All Superinterfaces:
CommandSender
,Entity
,Metadatable
,Nameable
,Permissible
,PersistentDataHolder
,ServerOperator
public interface EnderSignal extends Entity
Represents an EnderSignal, which is created upon throwing an ender eye.
-
Nested Class Summary
-
Method Summary
Modifier and Type Method Description int
getDespawnTimer()
Gets the amount of time this entity has been alive (in ticks).boolean
getDropItem()
Gets if the EnderSignal should drop an item on death.
Iftrue
, it will drop an item.ItemStack
getItem()
Get theItemStack
to be displayed while in the air and to be dropped on death.Location
getTargetLocation()
Get the location this EnderSignal is moving towards.void
setDespawnTimer(int timer)
Set how long this entity has been alive (in ticks).void
setDropItem(boolean drop)
Sets if the EnderSignal should drop an item on death; or if it should shatter.void
setItem(ItemStack item)
Set theItemStack
to be displayed while in the air and to be dropped on death.void
setTargetLocation(Location location)
Set theLocation
this EnderSignal is moving towards.Methods inherited from interface org.bukkit.command.CommandSender
getName, sendMessage, sendMessage, sendMessage, sendMessage
Methods inherited from interface org.bukkit.entity.Entity
addPassenger, addScoreboardTag, eject, getBoundingBox, getEntityId, getFacing, getFallDistance, getFireTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getNearbyEntities, getPassenger, getPassengers, getPistonMoveReaction, getPortalCooldown, getPose, getScoreboardTags, getServer, getTicksLived, getType, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, hasGravity, isCustomNameVisible, isDead, isEmpty, isGlowing, isInsideVehicle, isInvulnerable, isInWater, isOnGround, isPersistent, isSilent, isValid, leaveVehicle, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setPassenger, setPersistent, setPortalCooldown, setRotation, setSilent, setTicksLived, setVelocity, spigot, teleport, teleport, teleport, teleport
Methods inherited from interface org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadata
Methods inherited from interface org.bukkit.permissions.Permissible
addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, recalculatePermissions, removeAttachment
Methods inherited from interface org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainer
-
Method Details
-
getTargetLocation
Get the location this EnderSignal is moving towards.- Returns:
- the
Location
this EnderSignal is moving towards.
-
setTargetLocation
Set theLocation
this 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.- Parameters:
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.- Returns:
- 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.- Parameters:
drop
- true if the EnderSignal should drop an item on death, or false if it should shatter.
-
getItem
Get theItemStack
to be displayed while in the air and to be dropped on death.- Returns:
- the item stack
-
setItem
Set theItemStack
to be displayed while in the air and to be dropped on death.- Parameters:
item
- the item to set. If null, resets to the default eye of ender
-
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.- Returns:
- 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.- Parameters:
timer
- how long (in ticks) this EnderSignal has been alive.
-