Class GlowEnderPearl

All Implemented Interfaces:
net.kyori.adventure.audience.Audience, net.kyori.adventure.text.event.HoverEventSource<net.kyori.adventure.text.event.HoverEvent.ShowEntity>, org.bukkit.command.CommandSender, org.bukkit.entity.EnderPearl, org.bukkit.entity.Entity, org.bukkit.entity.Projectile, org.bukkit.entity.ThrowableProjectile, org.bukkit.metadata.Metadatable, org.bukkit.Nameable, org.bukkit.permissions.Permissible, org.bukkit.permissions.ServerOperator, org.bukkit.persistence.PersistentDataHolder

public class GlowEnderPearl extends GlowProjectile implements org.bukkit.entity.EnderPearl
  • Constructor Details

    • GlowEnderPearl

      public GlowEnderPearl(org.bukkit.Location location)
      Creates a thrown ender pearl with default speed.
      Parameters:
      location - the position and facing of the thrower
    • GlowEnderPearl

      public GlowEnderPearl(org.bukkit.Location location, float speed)
      Creates a thrown ender pearl.
      Parameters:
      location - the position and facing of the thrower
      speed - the initial speed
  • Method Details

    • collide

      public void collide(org.bukkit.block.Block block)
      Process teleportation when collide with a block.
      Specified by:
      collide in class GlowProjectile
      Parameters:
      block - the block that the ender pearl collides with
    • collide

      public void collide(org.bukkit.entity.LivingEntity entity)
      Process teleportation when collide with an entity.
      Specified by:
      collide in class GlowProjectile
      Parameters:
      entity - the eneity that the ender pearl collides with
    • getObjectId

      protected int getObjectId()
      Specified by:
      getObjectId in class GlowProjectile
    • createSpawnMessage

      public List<com.flowpowered.network.Message> createSpawnMessage()
      Description copied from class: GlowEntity
      Creates a list of Messages which can be sent to a client to spawn this entity. Implementations in concrete subclasses may return a shallowly immutable list.
      Overrides:
      createSpawnMessage in class GlowProjectile
      Returns:
      A list of messages which can spawn this entity.
    • getItem

      @NotNull public @NotNull org.bukkit.inventory.ItemStack getItem()
      Specified by:
      getItem in interface org.bukkit.entity.ThrowableProjectile
    • setItem

      public void setItem(@NotNull @NotNull org.bukkit.inventory.ItemStack itemStack)
      Specified by:
      setItem in interface org.bukkit.entity.ThrowableProjectile