From 722cc2e38c5cbb040177ea1b266113bba4eb3faa Mon Sep 17 00:00:00 2001 From: sk89q Date: Sun, 31 Aug 2014 19:05:59 -0700 Subject: [PATCH] Block polygonal regions for claiming for now. volume() returns 0. --- .../worldguard/bukkit/commands/region/RegionCommands.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/sk89q/worldguard/bukkit/commands/region/RegionCommands.java b/src/main/java/com/sk89q/worldguard/bukkit/commands/region/RegionCommands.java index 6c90965a..b06e66e7 100644 --- a/src/main/java/com/sk89q/worldguard/bukkit/commands/region/RegionCommands.java +++ b/src/main/java/com/sk89q/worldguard/bukkit/commands/region/RegionCommands.java @@ -57,6 +57,7 @@ import com.sk89q.worldguard.protection.managers.storage.DriverType; import com.sk89q.worldguard.protection.managers.storage.RegionDriver; import com.sk89q.worldguard.protection.regions.GlobalProtectedRegion; +import com.sk89q.worldguard.protection.regions.ProtectedPolygonalRegion; import com.sk89q.worldguard.protection.regions.ProtectedRegion; import com.sk89q.worldguard.protection.regions.ProtectedRegion.CircularInheritanceException; import com.sk89q.worldguard.util.Enums; @@ -266,6 +267,10 @@ public void claim(CommandContext args, CommandSender sender) throws CommandExcep // Check claim volume if (!permModel.mayClaimRegionsUnbounded()) { + if (region instanceof ProtectedPolygonalRegion) { + throw new CommandException("Polygons are currently not supported for /rg claim."); + } + if (region.volume() > wcfg.maxClaimVolume) { player.sendMessage(ChatColor.RED + "This region is too large to claim."); player.sendMessage(ChatColor.RED +