Help with particle effects

Discussion in 'Plugin Development' started by joshzen, Apr 30, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    joshzen

    I want to make a plugin called Enderbow that shoots enderpearls and plays particles at the location of the player but i can't figure out how to spawn those particles
    this is my code:
    Code:
        @EventHandler
        public void enderbowshoot(EntityShootBowEvent event) {
           
           
           
           
            if(event.getEntity() instanceof Player && event.getBow().getItemMeta().getDisplayName().equals(ChatColor.DARK_AQUA + "Ender Bow")) {
           
                event.setCancelled(true);
                event.getEntity().launchProjectile(EnderPearl.class);
               
                playEffect(event.getEntity().getLocation(), Effect.ITEM_BREAK, Material.LAVA);
            }
           
           
           
           
           
        }
    
     
  2. Offline

    mine-care

    Make proper null checks.
    You may use a library like ParticleLib to play particles via packets :- )
     
Thread Status:
Not open for further replies.

Share This Page