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.
  • Method Details Link icon

    • getTargetLocation Link icon

      @NotNull Location getTargetLocation()
      Get the location this EnderSignal is moving towards.
      Returns:
      the Location this EnderSignal is moving towards.
    • setTargetLocation Link icon

      void setTargetLocation(@NotNull Location location)
      Set the Location this EnderSignal is moving towards.
      When setting a new target location, the getDropItem() resets to a random value and the despawn timer gets set back to 0.
      Parameters:
      location - the new target location
    • getDropItem Link icon

      boolean getDropItem()
      Gets if the EnderSignal should drop an item on death.
      If true, it will drop an item. If false, it will shatter.
      Returns:
      true if the EnderSignal will drop an item on death, or false if it will shatter
    • setDropItem Link icon

      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 Link icon

      @NotNull ItemStack getItem()
      Get the ItemStack to be displayed while in the air and to be dropped on death.
      Returns:
      the item stack
    • setItem Link icon

      void setItem(@Nullable ItemStack item)
      Set the ItemStack 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 Link icon

      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 Link icon

      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.