mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-11-02 10:57:11 +00:00
Added the polyhedral selector to //sel.
This commit is contained in:
parent
731c8a0ce7
commit
37373976f5
@ -44,6 +44,7 @@ import com.sk89q.worldedit.WorldEditException;
|
||||
import com.sk89q.worldedit.blocks.BaseBlock;
|
||||
import com.sk89q.worldedit.blocks.BlockType;
|
||||
import com.sk89q.worldedit.data.ChunkStore;
|
||||
import com.sk89q.worldedit.regions.ConvexPolyhedralRegionSelector;
|
||||
import com.sk89q.worldedit.regions.CuboidRegionSelector;
|
||||
import com.sk89q.worldedit.regions.CylinderRegionSelector;
|
||||
import com.sk89q.worldedit.regions.EllipsoidRegionSelector;
|
||||
@ -766,8 +767,12 @@ public class SelectionCommands {
|
||||
} else if (typeName.equalsIgnoreCase("cyl")) {
|
||||
selector = new CylinderRegionSelector(oldSelector);
|
||||
player.print("Cylindrical selector: Left click=center, right click to extend.");
|
||||
} else if (typeName.equalsIgnoreCase("convex") || typeName.equalsIgnoreCase("hull") || typeName.equalsIgnoreCase("polyhedron")) {
|
||||
int maxVertices = we.getMaximumPolygonalPoints(player); // TODO: separate maximum for polyhedra
|
||||
selector = new ConvexPolyhedralRegionSelector(oldSelector, maxVertices);
|
||||
player.print("Convex polyhedral selector: Left click=First vertex, right click to add more.");
|
||||
} else {
|
||||
player.printError("Only cuboid|extend|poly|ellipsoid|sphere|cyl are accepted.");
|
||||
player.printError("Only cuboid|extend|poly|ellipsoid|sphere|cyl|convex are accepted.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user