Checking Block's Name and doing action

Discussion in 'Plugin Development' started by leland22, Mar 2, 2014.

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

    leland22

    I'm trying to add to my plugin where when the user right clicks with a web on a block it cancels the block placement (which I have already done), removes the item from the inventory, which happens already but I don't know how WorldGuard will affect this, and gives them a new renamed item. I can't seem to get the meta data of the block however. Any help would be greatly appreciated!


    Code:java
    1. @EventHandler
    2. public void onWebPlacement(BlockPlaceEvent event){
    3. Player p =event.getPlayer();
    4. Block b = event.getBlock();
    5. Inventory inventory = p.getInventory();
    6. if (p.getInventory().contains(Material.WEB)){
    7.  
    8.  
    9.  
    10. }
    11. event.setCancelled(true);
    12. }
     
  2. Offline

    97WaterPolo

Thread Status:
Not open for further replies.

Share This Page