World Guard API?

Discussion in 'Spigot Plugin Development' started by sirderp, Jun 26, 2016.

  1. Hey everyone. I am working on a boss plugin at the moment, and I need to make sure that the person who is spawning it is in a certain region claim, lets call it "BossFight". I was wondering if any of you know the method required for this?
    What I would most likely do is something like this:
    Code (Text):
    if(!(player.isInRegion("BossFight")) {
    player.sendMessage(ChatColor.RED + "You Have To Spawn These In The BattleZone!);
    return;
    }
    I know this is probably far from correct but it is all I can guess right now :p.

    Thanks
     
  2. Assuming you have the API setup the correct way (outlined here) You would need to create a
    ProtectedRegion object and use the method getFlag()