use of com.sk89q.worldguard.domains.DefaultDomain in project LandLord by SpatiumPrinceps.
the class WorldGuardHandler method claim.
public void claim(UUID owner, String landname, World world, Location down, Location upper) {
BlockVector vec1 = OwnedLand.locationToVec(down);
BlockVector vec2 = OwnedLand.locationToVec(upper);
ProtectedCuboidRegion pr = new ProtectedCuboidRegion(landname, vec1, vec2);
DefaultDomain ownerDomain = new DefaultDomain();
ownerDomain.addPlayer(owner);
pr.setOwners(ownerDomain);
// flag management
pr = setDefaultFlags(pr, down.getChunk());
RegionManager manager = wg.getRegionContainer().get(world);
if (manager != null) {
manager.addRegion(pr);
}
}
Aggregations