Solved need help (event) Action.LEFT_CLICK_BLOCK

Discussion in 'Plugin Development' started by cfritten, Mar 2, 2015.

?

how to cancel "op" blockbreak event for left.click.block

  1. make a new event?

    0 vote(s)
    0.0%
  2. i can cancel the op event then left.click.block?

    1 vote(s)
    100.0%
Thread Status:
Not open for further replies.
  1. Offline

    cfritten

    i'm new to create plugins and i have make a event with i need to get data from the "left.click.block" action.
    the thing here is that this event only should get called if player is op. but then he will destroy the block
    i need to some kind cancel the standard minecraft event for op?

    is this possible?

    code so far:
    http://pastebin.com/0W6fJbMy
     
  2. @cfritten
    Code:
    if(player.isOp()) {
        event.setCancelled(true);
    }
    You practically said the answer in your question.
     
  3. Offline

    cfritten

    i knew it was something about cancel the event. but i though that if I sad the up just like that it will cancel my own event?
     
Thread Status:
Not open for further replies.

Share This Page