BlockBreakEvent not cancelling?

Discussion in 'Plugin Development' started by Razorcane, Dec 18, 2011.

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

    Razorcane

    I have several instances of my code where I need to disable block breaking, however when I use event.setCancelled(true);, players are still able to break the blocks regardless. Could there be something overriding this even though I have the priority set to high?
     
  2. Offline

    Chiller

    All I know is that it works for me :)
     
  3. Offline

    user_43347

    According to this (http://forums.bukkit.org/threads/getting-your-priorities-straight-the-plugin-version.788/), highest priority, is actually close to the lowest, try setting to lowest, and see what happens.
     
  4. Offline

    Razorcane

    Highest means it is ran last, which means it's code is ran over the others. Low priority means it is ran first, and thus can be overridden by other code.

    I tested this extensively by removing all other plugins, and even removing lines of code not essential to the system, and yet the event is still not cancelled. I'm honestly at a loss for what to do.

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

Share This Page