[Wrong Section] Disable certain events in no-pvp regions?

Discussion in 'Spigot Plugin Help' started by SwiftLee, Jun 30, 2015.

  1. The title says it all. I need to know how to either check for WorldGuard's regions to disable certain events or just disable the code inside them.

    For example:

    You can use a specific item in pvp, but in a WorldGuard no-pvp region where, for example, you must use the PlayerInteractEvent to use the item, you can no longer use it inside that no-pvp region. Once you leave that region, access to using that item will be allowed.

    It doesn't matter if it requires the API for WorldGuard, as long as I can get this effect working and running... But, I'll need everything on how to setup the API to work as well if you do supply this information.

    EDIT: Already tried using:
    Code (Text):
    @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
    Thanks in advance,
    SwiftLee
     
    #1 SwiftLee, Jun 30, 2015
    Last edited: Jun 30, 2015