2D Regions
Since 1.0.0
Creating 2D regions
World world = Bukkit.getWorld("world");
// By coordinates: x1, z1, x2, z2
Region2D region = new Region2D(world, 5, 5, -5, -5);
// By locations: loc1, loc2
Location loc1 = new Location(world, 5, 0, 5); // Y coordinate doesn't matter.
Location loc2 = new Location(world, -5, 0, -5); // Y coordinate doesn't matter.
Region2D region = new Region2D(loc1, loc2);
Checking if anything is inside the region
Contains vs overlaps
Last updated