WorldGuard integration into plugin [Protected Regions]

Discussion in 'Plugin Development' started by Snowl, Jan 31, 2011.

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

    Snowl

    I want to integrate Worldguard into my plugin and to check if breaking a block in a protected zone, and not allowed to, then it stops it's function. Please help.

    Thanks.
     
  2. Offline

    Schirf

    Is Worldguard cancelling the event early or late in the priority flow? As long are you're not reacting to cancelled events...
     
  3. Offline

    Snowl

    Laaaaaate. It respawns the block but my plugin still triggers, as it's on Block = Broken. I don't want it to trigger if it is protected and they can't break it :( It's priority is even on lowest :(
     
  4. Offline

    Hidendra

    Use priority Highest.

    WorldGuard uses the priority High, so Highest will be called after High (in which you can then check if it's cancelled, and if it is, don't do anything)
     
  5. Offline

    Snowl

    Still doesnt work. Do I call
    if(!event.isCancelled())
    {
    //codehere
    }
    (Doesn't work)

    If I do
    if(event.isCancelled())
    {
    //codehere
    }

    It works, but never executes my code if i'm allowed to break inside the protected area/don't have worldguard

    URGHFHEFWHU! Still not working???! >_>
     
  6. Offline

    sk89q

    You're supposed to use normal or low and then check if the event is cancelled.

    But event handler priorities don't work in Bukkit yet, so it's currently impossible.
     
  7. Offline

    Snowl

Thread Status:
Not open for further replies.

Share This Page