use of com.denizenscript.denizen.nms.v1_18.impl.entities.EntityItemProjectileImpl in project Denizen-For-Bukkit by DenizenScript.
the class CustomEntityHelperImpl method spawnItemProjectile.
@Override
public ItemProjectile spawnItemProjectile(Location location, ItemStack itemStack) {
CraftWorld world = (CraftWorld) location.getWorld();
EntityItemProjectileImpl entity = new EntityItemProjectileImpl(world.getHandle(), location, CraftItemStack.asNMSCopy(itemStack));
world.getHandle().addEntity(entity, CreatureSpawnEvent.SpawnReason.CUSTOM);
return entity.getBukkitEntity();
}
Aggregations