Add config entries for polygonal region points limit

This commit is contained in:
aumgn
2012-04-22 17:11:50 +02:00
parent d2a72579ae
commit cd64ca459d
6 changed files with 38 additions and 3 deletions

View File

@ -761,6 +761,18 @@ public class WorldEdit {
}
}
public int getMaximumPolygonalPoints(LocalPlayer player) {
if (player.hasPermission("worldedit.limit.unrestricted") || config.maxPolygonalPoints < 0) {
return config.defaultMaxPolygonalPoints;
} else {
if (config.defaultMaxPolygonalPoints < 0) {
return config.maxPolygonalPoints;
}
return Math.min(config.defaultMaxPolygonalPoints,
config.maxPolygonalPoints);
}
}
/**
* Checks to see if the specified radius is within bounds.
*