Prevent dropping item

Discussion in 'Plugin Development' started by matejdro, Jan 20, 2012.

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

    matejdro

    I'm trying to create no-drops zome. Blocks don't drop anything, but problem is that item can also drop outside of block break event. For example when you break a block with torch on, torch will pop out and user will be able to pick it up.

    Any idea, how can I disable those? I think i have to do something with block physics event, but I don't know how to separate items popping out from other events (I still want every other physics intact).

    Any ideas?
     
  2. Offline

    Father Of Time

    Could you block this with "OnEntitySpawn" and "OnItemSpawn"? Simply check the region you are in, and if you are in a no spawn area simple cancel the event?

    I have no idea if this will work, just throwing it out there. Good luck!
     
  3. Offline

    matejdro

    There is onItemSpawn? I thought there is only onCreatureSpawn.
     
  4. Offline

    Father Of Time

  5. Offline

    matejdro

    Whoa, i will test that. Thanks.
     
  6. Offline

    Father Of Time

    It's my pleasure!

    good luck with your project, if you remember let us know how it went. :D
     
Thread Status:
Not open for further replies.

Share This Page