IPolygonalSelection points order are changed when your using Set
So change
return new IPolygonalSelection() {
@OverRide
public Set getPoints() {
return ((Polygonal2DRegion) selection).getPoints().stream()
.map(BlockVector2::toBlockVector3)
.map(vector -> BukkitAdapter.adapt(world, vector))
.collect(Collectors.toSet());
}
to
return new IPolygonalSelection() {
@OverRide
public List getPoints() {
return ((Polygonal2DRegion) selection).getPoints().stream()
.map(BlockVector2::toBlockVector3)
.map(vector -> BukkitAdapter.adapt(world, vector))
.collect(Collectors.toList());
}
to guaranteed order of list.