How to check if someone is in a world guard region?!

Discussion in 'Plugin Development' started by HyKurtis, Aug 7, 2015.

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


    Hello, I'm making a plugin where you can right click a slime ball and be ascended 10 blocks in the air and then a peice of glass is placed underneath you. Well obviously this means that if a player right clicks this slime at spawn it will place the glass at spawn.

    How do i make it so that this only works if you are not in a world guard region (exluding __global__)
    Here is my code for the slime ball:
  2. Offline



    That returns a set of all the regions overlapping that location.
  3. Offline


  4. Offline


    So once I put the API into the build paths what do I type in the code


    if(player.walkingInRegion("spawn") {


    Want i want it to do is not allow players to do what this code does if they are in any region excluding __global__

    EDIT by Timtower: merged posts
    Last edited by a moderator: Aug 7, 2015
  5. Offline


  6. Offline


    I've read that link above but there is nothing about checking if they are in a region. Or there is but i don't understand it
  7. Offline


  8. Offline


    Here, i'll write it in sudo code

    if player is in a region exluding __global__ {
    //run the bounce thing
    else {
    player.sendMessage("You can not use that here");
  9. Offline


    You're the one that needs help so I'm not sure why you're telling me that. But the link above gives it to you even with examples...
  10. Offline


    I mean i need to know the java for it not the pseuo code i can't understand how to do it even after reading the link above
Thread Status:
Not open for further replies.

Share This Page