Solved Check if player placed on a specific block

Discussion in 'Plugin Development' started by Geekhellmc, Aug 24, 2014.

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

    Geekhellmc

    Ok so I know how to check if the player placed by exemple a diamond block on a gold block but I don't know how to cancel the block place of the diamond block on another block then the gold block. Anyone knows?
     
  2. Offline

    Totom3

    Geekhellmc Did you try event#setCancelled(true); ?
     
  3. Offline

    Geekhellmc

    Totom3 I want the player to place a diamons block only on gold block, not the rest of the of the blocks
     
  4. Offline

    Totom3

    Geekhellmc Yeah well you test that first then if it's not a diamond block being placed on a gold block, you cancel the event using event#setCancelled(true)
     
  5. Offline

    Geekhellmc

    Totom3 I will try

    Totom3 Worked :D

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 10, 2016
Thread Status:
Not open for further replies.

Share This Page