Bug at dropItemNaturally() and dropItem()

Discussion in 'Plugin Development' started by redpois0n, Sep 25, 2011.

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

    redpois0n

    So i got this code, where i drop a bookshelf when a bookshelf if destroyed.

    event.getBlock().getWorld().dropItemNaturally(event.getBlock().getLocation(), new ItemStack(drop.getDrop(event.getBlock())));
    event.getBlock().setType(Material.AIR);

    It drops the bookshelf, but it cant be picked up. is this a bukkit bug?


    please help
     
  2. Offline

    md_5

    This is what I use:
    Code:
    block.getWorld().dropItemNaturally(block.getLocation(), new ItemStack(Material.SIGN, 1));
    I think the problem is you dont have the number of items in the stack
     
  3. Offline

    redpois0n

    testing that metod.
     
  4. Offline

    md_5

    Just make sure you replace block with event.getblock, I already casted it to its own variable
     
  5. Offline

    redpois0n

    Thank you :D
     
  6. Offline

    md_5

    Thats alright.
     
Thread Status:
Not open for further replies.

Share This Page