Package org.bukkit.entity
Interface EnderSignal
- All Superinterfaces:
Audience
,CommandSender
,Entity
,HoverEventSource<HoverEvent.ShowEntity>
,Metadatable
,Nameable
,Permissible
,PersistentDataHolder
,Pointered
,ServerOperator
,Sound.Emitter
Represents an EnderSignal, which is created upon throwing an ender eye.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.bukkit.entity.Entity
Entity.Spigot
-
Method Summary
Modifier and TypeMethodDescriptionint
Gets the amount of time this entity has been alive (in ticks).boolean
Gets if the EnderSignal should drop an item on death.
Iftrue
, it will drop an item.getItem()
Get theItemStack
to be displayed while in the air and to be dropped on death.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
Set theItemStack
to be displayed while in the air and to be dropped on death.void
setTargetLocation
(@NotNull Location location) Set theLocation
this EnderSignal is moving towards.void
setTargetLocation
(@NotNull Location location, boolean update) Set theLocation
this EnderSignal is moving towards.Methods inherited from interface net.kyori.adventure.audience.Audience
clearResourcePacks, clearTitle, deleteMessage, deleteMessage, filterAudience, forEachAudience, hideBossBar, openBook, openBook, playSound, playSound, playSound, removeResourcePacks, removeResourcePacks, removeResourcePacks, removeResourcePacks, resetTitle, sendActionBar, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendPlayerListHeaderAndFooter, sendResourcePacks, sendResourcePacks, sendResourcePacks, sendTitlePart, showBossBar, showTitle, stopSound, stopSound
Methods inherited from interface org.bukkit.command.CommandSender
getName, name, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlainMessage, sendRichMessage, sendRichMessage
Methods inherited from interface org.bukkit.entity.Entity
addPassenger, addScoreboardTag, asHoverEvent, collidesAt, copy, copy, createSnapshot, eject, fromMobSpawner, getBoundingBox, getChunk, getEntityId, getEntitySpawnReason, getFacing, getFallDistance, getFireTicks, getFreezeTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getMaxFreezeTicks, getNearbyEntities, getOrigin, getPassenger, getPassengers, getPistonMoveReaction, getPitch, getPortalCooldown, getPose, getRider, getScheduler, getScoreboardEntryName, getScoreboardTags, getServer, getSpawnCategory, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTicksLived, getTrackedBy, getTrackedPlayers, getType, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, getX, getY, getYaw, getZ, hasFixedPose, hasGravity, hasRider, isCustomNameVisible, isDead, isEmpty, isFreezeTickingLocked, isFrozen, isGlowing, isImmuneToFire, isInBubbleColumn, isInDaylight, isInLava, isInPowderedSnow, isInRain, isInsideVehicle, isInvulnerable, isInWater, isInWaterOrBubbleColumn, isInWaterOrRain, isInWaterOrRainOrBubbleColumn, isInWorld, isOnGround, isPersistent, isRidable, isRidableInWater, isSilent, isSneaking, isTicking, isUnderWater, isValid, isVisibleByDefault, isVisualFire, leaveVehicle, lockFreezeTicks, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setFreezeTicks, setGlowing, setGravity, setImmuneToFire, setInvulnerable, setLastDamageCause, setPassenger, setPersistent, setPortalCooldown, setPose, setPose, setRotation, setSilent, setSneaking, setTicksLived, setVelocity, setVisibleByDefault, setVisualFire, spawnAt, spawnAt, spigot, teamDisplayName, teleport, teleport, teleport, teleport, teleport, teleport, teleportAsync, teleportAsync, wouldCollideUsing
Methods inherited from interface net.kyori.adventure.text.event.HoverEventSource
asHoverEvent
Methods inherited from interface org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadata
Methods inherited from interface org.bukkit.Nameable
customName, customName, getCustomName, setCustomName
Methods inherited from interface org.bukkit.permissions.Permissible
addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, permissionValue, permissionValue, recalculatePermissions, removeAttachment
Methods inherited from interface org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainer
Methods inherited from interface net.kyori.adventure.pointer.Pointered
get, getOrDefault, getOrDefaultFrom, pointers
Methods inherited from interface org.bukkit.permissions.ServerOperator
isOp, setOp
-
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
-
setTargetLocation
Set theLocation
this EnderSignal is moving towards.- Parameters:
location
- the new target locationupdate
- true to reset thegetDropItem()
to a random value andgetDespawnTimer()
to 0
-
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.
-