001    package org.bukkit.projectiles;
002    
003    import org.bukkit.entity.Projectile;
004    import org.bukkit.util.Vector;
005    
006    /**
007     * Represents a valid source of a projectile.
008     */
009    public interface ProjectileSource {
010    
011        /**
012         * Launches a {@link Projectile} from the ProjectileSource.
013         *
014         * @param projectile class of the projectile to launch
015         * @return the launched projectile
016         */
017        public <T extends Projectile> T launchProjectile(Class<? extends T> projectile);
018    
019        /**
020         * Launches a {@link Projectile} from the ProjectileSource with an
021         * initial velocity.
022         *
023         * @param projectile class of the projectile to launch
024         * @param velocity the velocity with which to launch
025         * @return the launched projectile
026         */
027        public <T extends Projectile> T launchProjectile(Class<? extends T> projectile, Vector velocity);
028    }