Interface Projectile

All Superinterfaces:
CommandSender, Entity, Metadatable, Nameable, Permissible, PersistentDataHolder, ServerOperator
All Known Subinterfaces:
AbstractArrow, AbstractWindCharge, Arrow, BreezeWindCharge, DragonFireball, Egg, EnderPearl, Fireball, Firework, FishHook, LargeFireball, LingeringPotion, LlamaSpit, ShulkerBullet, SizedFireball, SmallFireball, Snowball, SpectralArrow, SplashPotion, ThrowableProjectile, ThrownExpBottle, ThrownPotion, TippedArrow, Trident, WindCharge, WitherSkull

public interface Projectile extends Entity
Represents a shootable entity.
  • Method Details

    • getShooter

      @Nullable ProjectileSource getShooter()
      Retrieve the shooter of this projectile.
      Returns:
      the ProjectileSource that shot this projectile
    • setShooter

      void setShooter(@Nullable ProjectileSource source)
      Set the shooter of this projectile.
      Parameters:
      source - the ProjectileSource that shot this projectile
    • doesBounce

      @Deprecated boolean doesBounce()
      Deprecated.
      does not do anything
      Determine if this projectile should bounce or not when it hits.
      Returns:
      true if it should bounce.
    • setBounce

      @Deprecated void setBounce(boolean doesBounce)
      Deprecated.
      does not do anything
      Set whether or not this projectile should bounce or not when it hits something.
      Parameters:
      doesBounce - whether or not it should bounce.