WorldGuardWrapper icon indicating copy to clipboard operation
WorldGuardWrapper copied to clipboard

IPolygonalSelection points are not in the correct order

Open poloskey opened this issue 2 years ago • 1 comments

IPolygonalSelection points order are changed when your using Set

So change return new IPolygonalSelection() { @Override public Set<Location> 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<Location> getPoints() { return ((Polygonal2DRegion) selection).getPoints().stream() .map(BlockVector2::toBlockVector3) .map(vector -> BukkitAdapter.adapt(world, vector)) .collect(Collectors.toList()); }

to guaranteed order of list.

poloskey avatar Sep 28 '23 23:09 poloskey

It will mess up dynmap when using not the correct order. dynmap

This one is with List dynmap2

poloskey avatar Sep 30 '23 00:09 poloskey