WorldGuard API help, detecting if a player is in ANY region. Help still needed!

Discussion in 'Plugin Development' started by HaitherecreeperMC, Nov 3, 2013.

Thread Status:
Not open for further replies.
  1. I am trying to check if a player is in a region and I used the code from the wiki
    Code:
    for (ProtectedRegion region : set) {
        // region here
    }
    
    I also have
    Code:
    import com.sk89q.worldguard.protection.regions.ProtectedRegion;
    so that can't be the problem. I also have the WorldGuard.jar in referenced Libraries.
    The problem with the
    Code:
    for (ProtectedRegion region : set) {
        // region here
    }
    
    Is that set is underlined in red and it says "set cannot be resolved to a variable."
    Help?
     
  2. Offline

    Aengo

    You don't have a ProtectedRegion variable list called set.
     
  3. Ok, how do I do that?
    Also, I'm just trying to see if a player is in ANY region.
     
  4. Offline

    Aengo

    Well, I don't know the WG API off by heart, but to create set it would be something like
    Code:java
    1. ProtectedRegion[] set;
    2. set = //Initialize it here;
     
  5. Ok, so how would I initialize it to check if a player is in ANY region, not a particular one?
     
  6. Offline

    Aengo

    As I said, I don't know the worldguard API.
     
  7. Ah, ok. I'll wait for someone else to reply :D
     
Thread Status:
Not open for further replies.

Share This Page