Newer
Older
ultramine_bukkit / src / main / java / org / bukkit / projectiles / ProjectileSource.java
@vlad20012 vlad20012 on 24 Feb 2017 795 bytes initial
package org.bukkit.projectiles;

import org.bukkit.entity.Projectile;
import org.bukkit.util.Vector;

/**
 * Represents a valid source of a projectile.
 */
public interface ProjectileSource
{

	/**
	 * Launches a {@link Projectile} from the ProjectileSource.
	 *
	 * @param projectile class of the projectile to launch
	 * @return the launched projectile
	 */
	public <T extends Projectile> T launchProjectile(Class<? extends T> projectile);

	/**
	 * Launches a {@link Projectile} from the ProjectileSource with an
	 * initial velocity.
	 *
	 * @param projectile class of the projectile to launch
	 * @param velocity   the velocity with which to launch
	 * @return the launched projectile
	 */
	public <T extends Projectile> T launchProjectile(Class<? extends T> projectile, Vector velocity);
}