Package com.sk89q.worldedit.regions.selector

Examples of com.sk89q.worldedit.regions.selector.CuboidRegionSelector


                .build();
        Operations.completeLegacy(operation);

        if (selectPasted) {
            Vector max = to.add(region.getMaximumPoint().subtract(region.getMinimumPoint()));
            RegionSelector selector = new CuboidRegionSelector(player.getWorld(), to, max);
            session.setRegionSelector(player.getWorld(), selector);
            selector.learnChanges();
            selector.explainRegionAdjust(player, session);
        }

        player.print("The clipboard has been pasted at " + to);
    }
View Full Code Here


            player.print("Chunk selected: "
                    + min2D.getBlockX() + ", " + min2D.getBlockZ());
        }

        final CuboidRegionSelector selector;
        if (session.getRegionSelector(world) instanceof ExtendingCuboidRegionSelector) {
            selector = new ExtendingCuboidRegionSelector(world);
        } else {
            selector = new CuboidRegionSelector(world);
        }
        selector.selectPrimary(min, ActorSelectorLimits.forActor(player));
        selector.selectSecondary(max, ActorSelectorLimits.forActor(player));
        session.setRegionSelector(world, selector);

        session.dispatchCUISelection(player);

    }
View Full Code Here

        final String typeName = args.getString(0);
        final RegionSelector oldSelector = session.getRegionSelector(world);

        final RegionSelector selector;
        if (typeName.equalsIgnoreCase("cuboid")) {
            selector = new CuboidRegionSelector(oldSelector);
            player.print("Cuboid: left click for point 1, right click for point 2");
        } else if (typeName.equalsIgnoreCase("extend")) {
            selector = new ExtendingCuboidRegionSelector(oldSelector);
            player.print("Cuboid: left click for a starting point, right click to extend");
        } else if (typeName.equalsIgnoreCase("poly")) {
View Full Code Here

        if (pt2 == null) {
            throw new IllegalArgumentException("Null point 2 not permitted");
        }

        // Create new selector
        CuboidRegionSelector sel = new CuboidRegionSelector(BukkitUtil.getLocalWorld(world));

        // set up selector
        sel.selectPrimary(pt1, PermissiveSelectorLimits.getInstance());
        sel.selectSecondary(pt2, PermissiveSelectorLimits.getInstance());

        // set up CuboidSelection
        cuboid = sel.getIncompleteRegion();

        // set up RegionSelection
        setRegionSelector(sel);
        setRegion(cuboid);
    }
View Full Code Here

TOP

Related Classes of com.sk89q.worldedit.regions.selector.CuboidRegionSelector

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.