despawn unpickable item after X ticks...

Discussion in 'Plugin Development' started by Niv200, Jul 28, 2013.

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

    Niv200

    hello! i made plugin that makes bow with custom name shoot some block with name pop...
    now - how can i make the item un-pickable and after 5seconds despawn?
    i tried alot of things but nothing worked :(
     
  2. Offline

    xxMOxMOxx

    I'm not sure how to make it despawn so quickly but you can prevent it from being picked up with the Item.setPickupDelay(int PickupDelay) command and setting PickupDelay to a very high number so it despawns before it can be picked up.
     
  3. Offline

    chasechocolate

    To make it despawn after a few seconds, you can use schedulers (specifically BukkitRunnables) and use item.remove().
     
Thread Status:
Not open for further replies.

Share This Page