Shoot items witch make Damage

Discussion in 'Plugin Development' started by Lurieder, Jul 29, 2014.

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

    Lurieder

    I need help i will shoot items witch make damage on Players!


    if(a == Action.RIGHT_CLICK_AIR | a == Action.RIGHT_CLICK_BLOCK) {
    if(p.getItemInHand().getType() == Material.STONE_AXE){
    Item em = p.getWorld().dropItem(p.getEyeLocation(), new ItemStack(Material.EMERALD));
    em.setVelocity(p.getEyeLocation().getDirection().multiply(4));
    p.playSound(p.getLocation(), Sound.BLAZE_HIT, 1F, 1F);
    }
    }
     
  2. Offline

    caseif

    Could you elaborate on the issue you're facing?
     
  3. Offline

    ReadySetPawn

    Try ProJectileHitEvent in a different method and set the damage of the emerald
     
Thread Status:
Not open for further replies.

Share This Page