try {
Region region = selector.getRegion();
World world = BukkitAdapter.asBukkitWorld(session.getSelectionWorld()).getWorld();
if (region instanceof CuboidRegion) {
return new CuboidSelection(world, selector, (CuboidRegion) region);
} else if (region instanceof Polygonal2DRegion) {
return new Polygonal2DSelection(world, selector, (Polygonal2DRegion) region);
} else if (region instanceof CylinderRegion) {
return new CylinderSelection(world, selector, (CylinderRegion) region);
} else {