mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-23 19:16:40 +01:00
Block polygonal regions for claiming for now.
volume() returns 0.
This commit is contained in:
parent
669c0e9651
commit
722cc2e38c
@ -57,6 +57,7 @@
|
|||||||
import com.sk89q.worldguard.protection.managers.storage.DriverType;
|
import com.sk89q.worldguard.protection.managers.storage.DriverType;
|
||||||
import com.sk89q.worldguard.protection.managers.storage.RegionDriver;
|
import com.sk89q.worldguard.protection.managers.storage.RegionDriver;
|
||||||
import com.sk89q.worldguard.protection.regions.GlobalProtectedRegion;
|
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;
|
||||||
import com.sk89q.worldguard.protection.regions.ProtectedRegion.CircularInheritanceException;
|
import com.sk89q.worldguard.protection.regions.ProtectedRegion.CircularInheritanceException;
|
||||||
import com.sk89q.worldguard.util.Enums;
|
import com.sk89q.worldguard.util.Enums;
|
||||||
@ -266,6 +267,10 @@ public void claim(CommandContext args, CommandSender sender) throws CommandExcep
|
|||||||
|
|
||||||
// Check claim volume
|
// Check claim volume
|
||||||
if (!permModel.mayClaimRegionsUnbounded()) {
|
if (!permModel.mayClaimRegionsUnbounded()) {
|
||||||
|
if (region instanceof ProtectedPolygonalRegion) {
|
||||||
|
throw new CommandException("Polygons are currently not supported for /rg claim.");
|
||||||
|
}
|
||||||
|
|
||||||
if (region.volume() > wcfg.maxClaimVolume) {
|
if (region.volume() > wcfg.maxClaimVolume) {
|
||||||
player.sendMessage(ChatColor.RED + "This region is too large to claim.");
|
player.sendMessage(ChatColor.RED + "This region is too large to claim.");
|
||||||
player.sendMessage(ChatColor.RED +
|
player.sendMessage(ChatColor.RED +
|
||||||
|
Loading…
Reference in New Issue
Block a user