Solved itemstack you can not take it

Discussion in 'Plugin Development' started by theyanay5, Aug 10, 2013.

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

    theyanay5

    Hey,
    I want to do itemstack and drop it (by dropItemNaturally) but I do not want players to be able to take it.
    How to do it?
    Thank you :)
     
  2. Offline

    LinearLogic

    When you spawn the ItemStack into the world as an Item entity, store its UUID. Then write a PlayerPickupItemEvent listener that cancels the event if the item being picked up matches the stored UUID.
     
  3. Offline

    theyanay5

    how to get the UUID of the entity? .getEntityId()?
     
  4. Offline

    LinearLogic

    entity.getUniqueId()
     
  5. Offline

    theyanay5

    Thank you :)
     
Thread Status:
Not open for further replies.

Share This Page