KillReward

Discussion in 'Plugin Development' started by DuctTapeAndWaxDev, Jun 5, 2014.

Thread Status:
Not open for further replies.
  1. Hello,
    This is a plugin i made for a PvP server. I can't seem to get it to work and feel that someone else can help me. When a player picks up a gapple it gives them the potion effects that i set, however when they kill a player it does not drop the gapple. Which is what the problem here is. Please make sure that there are no errors when a player does /kill. Thanks for your help!

    // SOLVED!
     
  2. Offline

    Dubehh

    DuctTapeAndWaxDev

    Okay, im not entirely sure but since you clear the drops first, there are no drops left. And then you add something to the drop which is not even there. If that makes sense.

    Try:
    Code:java
    1. p.getWorld().dropItemNaturally(p.getLocation(), new ItemStack(Material.GOLDEN_APPLE, 1));


    Again: Not sure.
     
  3. Dubehh It doesn't really make sense.
    DuctTapeAndWaxDev You use this.apple which would be how you access a field, not a local variable. Also, you don't check whether the player had a killer before assuming that they do. getKiller() can return null
     
Thread Status:
Not open for further replies.

Share This Page