Trow a particle spear

Discussion in 'Plugin Development' started by CraterHater, Jul 27, 2015.

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

    CraterHater

    I want to be able to shoots a trial of particles that damage the entity that gets hit by it, I want It done with this code:
    Code:
    @EventHandler
    public void onPlayerUse16(PlayerInteractEvent event){
        Player p = event.getPlayer();         
        if(event.getAction().equals(Action.RIGHT_CLICK_AIR)){
            if(p.getItemInHand().getType() == Material.STONE_SWORD){   
    How?
     
  2. maybe the WorldEdit API has a method for it.. You can damage the near entities with
    Code:
    for(Entity en : player.getNearbyEntities(range, range, range)
      en.damage(2.0);
     
Thread Status:
Not open for further replies.

Share This Page