Skip to content

Commit

Permalink
Add <player.inregion[region_name]> for WorldGuard
Browse files Browse the repository at this point in the history
  • Loading branch information
Morphan1 committed Jun 26, 2013
1 parent 2ea1947 commit 395f639
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/main/java/net/aufdemrand/denizen/tags/core/PlayerTags.java
Expand Up @@ -8,6 +8,7 @@
import net.aufdemrand.denizen.utilities.arguments.*;
import net.aufdemrand.denizen.utilities.debugging.dB;
import net.aufdemrand.denizen.utilities.depends.Depends;
import net.aufdemrand.denizen.utilities.depends.WorldGuardUtilities
import net.aufdemrand.denizen.utilities.nbt.NBTItem;
import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
Expand Down Expand Up @@ -404,6 +405,16 @@ else if (subType.equalsIgnoreCase("WORLD"))
dB.echoError("Cannot check group! No permissions loaded!");
}

} else if (type.equalsIgnoreCase("INREGION")) {
if(Depends.worldGuard != null)
{
event.setReplaced(String.valueOf(WorldGuardUtilities.checkPlayerWGRegion(context.getPlayer(), typeContext)));
}
else
{
dB.echoError("Cannot check region! WorldGuard isn't loaded!");
}

} else if (type.equalsIgnoreCase("GAMEMODE")) {
if (subType.equalsIgnoreCase("ID"))
event.setReplaced(String.valueOf(p.getGameMode().getValue()));
Expand Down

0 comments on commit 395f639

Please sign in to comment.