PlayerDropItemEvent

Discussion in 'Plugin Development' started by AmiT177, Jan 14, 2015.

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

    AmiT177

    Hey,
    I coded a code that block drop if the item is not bowl:
    http://pastebin.com/6AahQ6SA
    It working and all but now i have problem,
    I want to create a Scheduler of 3 seconds,
    i need that the item will removed after 3 seconds, wil play smoke effect, and if this item dropped other players will cant pickup it.
    Please help :)
     
  2. Offline

    dsouzamatt

  3. Offline

    AmiT177

    i know that i need it,
    but i dont remember how to do that in my code
    because i need to do the message and the check if the item is bowl
    and in the scheduler i need to add effect,pickupdealy and remove...
     
  4. Offline

    dsouzamatt

  5. Offline

    AmiT177

  6. Offline

    dsouzamatt

  7. Offline

    AmiT177

    it dont give errors, but it working in the wrong way.
    im dropping item and it works, and after 3 seconds it saying me you cant drop this item...
    same with bowl
     
  8. Offline

    dsouzamatt

    @AmiT177 Your brackets look a bit strange at line 10.

    This
    Code:
    else{ if
    Should be like this
    Code:
    else if
    In any case, you don't need to use an else-if statement, just an else would do.

    You also don't need to cancel the event at line 14, as you are already extending the pickup delay and removing the item after 3 seconds.
     
    GrandmaJam likes this.
Thread Status:
Not open for further replies.

Share This Page