mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00:00
Fix FAWE using exclusive build height from PlotSquared (#2123)
Use inclusive build height maximum
This commit is contained in:
parent
6a31f4179c
commit
526e1902ca
@ -158,8 +158,10 @@ public class PlotSquaredFeature extends FaweMaskManager {
|
||||
|
||||
Region maskedRegion;
|
||||
if (regions.size() == 1) {
|
||||
int min = area != null ? area.getMinBuildHeight() : player.getWorld().getMinY();
|
||||
int max = area != null ? Math.min(player.getWorld().getMaxY(), area.getMaxBuildHeight()) : player.getWorld().getMaxY();
|
||||
final World world = player.getWorld();
|
||||
int min = area != null ? area.getMinBuildHeight() : world.getMinY();
|
||||
// PlotSquared uses exclusive max height, WorldEdit uses inclusive max height -> subtract 1
|
||||
int max = area != null ? Math.min(world.getMaxY(), area.getMaxBuildHeight() - 1) : world.getMaxY();
|
||||
|
||||
final CuboidRegion region = regions.iterator().next();
|
||||
final BlockVector3 pos1 = BlockVector3.at(region.getMinimumX(), min, region.getMinimumZ());
|
||||
|
Loading…
Reference in New Issue
Block a user