Shoot-Event (Snowball)

Discussion in 'Plugin Development' started by ScottGambler, Oct 13, 2012.

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

    ScottGambler

    Hey :)

    Is there any EventListener, which I can use for an "Shoot-Event". Because i'm working on a plugin,that when you shoot a snowball,and he's hidden , we became the Confusion Effect.

    I have tryed with PlayerEggThrow Event, but it don't work,because the Snowball isn't an Egg :D And i have tryed with the throwSnoball Method.. ^^

    Code:
    if (event.getPlayer().throwSnowball() != null);{
     
  2. Offline

    slater96

    You need to use ProjectileHitEvent or PlayerInteractEvent.
     
  3. Offline

    ZeusAllMighty11

    DogeDev likes this.
  4. Offline

    gamerzap

  5. Offline

    xXSniperzzXx_SD

    Question how would i make a player throw a slimeball? just get when they interact and set velocity etc?
     
  6. Offline

    SeroeCraft

    ^^^^^^^ bump. I have the same question
     
  7. Offline

    DogeDev

    xXSniperzzXx_SD SeroeCraft
    Code:java
    1. Item item = player.getWorld().dropItem(player.getLocation(), new ItemStack(Material.SLIME_BALL));
    2. item.setVelocity(player.getLocation().getDirection().multiply(2.0D));

    Velocity, Location, etc. can be edited.
     
Thread Status:
Not open for further replies.

Share This Page