Package org.bukkit.projectiles
Interface ProjectileSource
- All Known Subinterfaces:
Ageable,Ambient,Animals,ArmorStand,Bat,Blaze,BlockProjectileSource,CaveSpider,Chicken,ComplexLivingEntity,Cow,Creature,Creeper,EnderDragon,Enderman,Endermite,Flying,Ghast,Giant,Golem,Guardian,Horse,HumanEntity,IronGolem,LivingEntity,MagmaCube,Monster,MushroomCow,NPC,Ocelot,Pig,PigZombie,Player,Rabbit,Sheep,Silverfish,Skeleton,Slime,Snowman,Spider,Squid,Villager,WaterMob,Witch,Wither,Wolf,Zombie
public interface ProjectileSource
Represents a valid source of a projectile.
-
Method Summary
Modifier and Type Method Description <T extends Projectile>
TlaunchProjectile(java.lang.Class<? extends T> projectile)Launches aProjectilefrom the ProjectileSource.<T extends Projectile>
TlaunchProjectile(java.lang.Class<? extends T> projectile, Vector velocity)Launches aProjectilefrom the ProjectileSource with an initial velocity.
-
Method Details
-
launchProjectile
Launches aProjectilefrom the ProjectileSource.- Type Parameters:
T- a projectile subclass- Parameters:
projectile- class of the projectile to launch- Returns:
- the launched projectile
-
launchProjectile
<T extends Projectile> T launchProjectile(java.lang.Class<? extends T> projectile, Vector velocity)Launches aProjectilefrom the ProjectileSource with an initial velocity.- Type Parameters:
T- a projectile subclass- Parameters:
projectile- class of the projectile to launchvelocity- the velocity with which to launch- Returns:
- the launched projectile
-