Package org.bukkit.projectiles
Interface ProjectileSource
- All Known Subinterfaces:
AbstractHorse
,AbstractVillager
,Ageable
,Ambient
,Animals
,ArmorStand
,Bat
,Bee
,Blaze
,BlockProjectileSource
,Cat
,CaveSpider
,ChestedHorse
,Chicken
,Cod
,ComplexLivingEntity
,Cow
,Creature
,Creeper
,Dolphin
,Donkey
,Drowned
,ElderGuardian
,EnderDragon
,Enderman
,Endermite
,Evoker
,Fish
,Flying
,Fox
,Ghast
,Giant
,Golem
,Guardian
,Hoglin
,Horse
,HumanEntity
,Husk
,Illager
,Illusioner
,IronGolem
,LivingEntity
,Llama
,MagmaCube
,Mob
,Monster
,Mule
,MushroomCow
,NPC
,Ocelot
,Panda
,Parrot
,Phantom
,Pig
,Piglin
,PigZombie
,Pillager
,Player
,PolarBear
,PufferFish
,Rabbit
,Raider
,Ravager
,Salmon
,Sheep
,Shulker
,Silverfish
,Skeleton
,SkeletonHorse
,Slime
,Snowman
,Spellcaster
,Spider
,Squid
,Steerable
,Stray
,Strider
,Tameable
,TraderLlama
,TropicalFish
,Turtle
,Vex
,Villager
,Vindicator
,WanderingTrader
,WaterMob
,Witch
,Wither
,WitherSkeleton
,Wolf
,Zoglin
,Zombie
,ZombieHorse
,ZombieVillager
public interface ProjectileSource
Represents a valid source of a projectile.
-
Method Summary
Modifier and Type Method Description <T extends Projectile>
TlaunchProjectile(Class<? extends T> projectile)
Launches aProjectile
from the ProjectileSource.<T extends Projectile>
TlaunchProjectile(Class<? extends T> projectile, Vector velocity)
Launches aProjectile
from the ProjectileSource with an initial velocity.
-
Method Details
-
launchProjectile
Launches aProjectile
from the ProjectileSource.- Type Parameters:
T
- a projectile subclass- Parameters:
projectile
- class of the projectile to launch- Returns:
- the launched projectile
-
launchProjectile
@NotNull <T extends Projectile> T launchProjectile(@NotNull Class<? extends T> projectile, @Nullable Vector velocity)Launches aProjectile
from 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
-