Skip to content
Permalink
Browse files

Send CUI changes when using /rg select.

  • Loading branch information...
wizjany committed Jun 27, 2019
1 parent af3eb85 commit 4ff42c81b5c9aa3d1c177c0b76c67ea240f6099f
@@ -357,16 +357,19 @@ protected static void setPlayerSelection(LocalPlayer player, ProtectedRegion reg
BlockVector3 pt1 = cuboid.getMinimumPoint();
BlockVector3 pt2 = cuboid.getMaximumPoint();

session.setRegionSelector(player.getWorld(), new CuboidRegionSelector(player.getWorld(), pt1, pt2));
CuboidRegionSelector selector = new CuboidRegionSelector(player.getWorld(), pt1, pt2);
session.setRegionSelector(player.getWorld(), selector);
selector.explainRegionAdjust(player, session);
player.print("Region selected as a cuboid.");

} else if (region instanceof ProtectedPolygonalRegion) {
ProtectedPolygonalRegion poly2d = (ProtectedPolygonalRegion) region;
Polygonal2DRegionSelector selector = new Polygonal2DRegionSelector(
player.getWorld(), poly2d.getPoints(),
poly2d.getMinimumPoint().getBlockY(),
poly2d.getMaximumPoint().getBlockY() );
poly2d.getMaximumPoint().getBlockY());
session.setRegionSelector(player.getWorld(), selector);
selector.explainRegionAdjust(player, session);
player.print("Region selected as a polygon.");

} else if (region instanceof GlobalProtectedRegion) {

0 comments on commit 4ff42c8

Please sign in to comment.
You can’t perform that action at this time.