Package com.sk89q.worldedit

Examples of com.sk89q.worldedit.EditSession.flushQueue()


        try {
            editSession.setBlock(clicked.toVector(), new BaseBlock(BlockID.AIR));
        } catch (MaxChangedBlocksException e) {
            player.printError("Max blocks change limit reached.");
        } finally {
            editSession.flushQueue();
        }

        world.playEffect(clicked.toVector(), 2001, blockType);

        return true;
View Full Code Here


        } finally {
            EditSession editSession = locals.get(EditSession.class);

            if (editSession != null) {
                session.remember(editSession);
                editSession.flushQueue();

                if (config.profile) {
                    long time = System.currentTimeMillis() - start;
                    int changed = editSession.getBlockChangeCount();
                    if (time > 0) {
View Full Code Here

            actor.print("Killed " + killed + " mobs in a radius of " + radius + ".");
        }

        if (editSession != null) {
            session.remember(editSession);
            editSession.flushQueue();
        }
    }

    @Command(
        aliases = { "remove", "rem", "rement" },
View Full Code Here

        actor.print("Marked " + (removed != 1 ? "entities" : "entity") + " for removal.");

        if (editSession != null) {
            session.remember(editSession);
            editSession.flushQueue();
        }
    }

    @Command(
        aliases = { "/calc", "/calculate", "/eval", "/evaluate", "/solve" },
View Full Code Here

        try {
            EditSession editSession = new EditSession(new BukkitWorld(world), -1);
            editSession.enableQueue();
            clipboard.place(editSession, origin, false);
            editSession.flushQueue();
        } catch (MaxChangedBlocksException e) {
            // is never thrown because we are on infinite mode
        }
    }
View Full Code Here

            CuboidRegion region = new CuboidRegion(origin, origin.add(size.getX() - 1, size.getY() - 1,
                    size.getZ() - 1));
            EditSession editSession = new EditSession(new BukkitWorld(world), -1);
            editSession.enableQueue();
            editSession.setBlocks(region, new BaseBlock(0));
            editSession.flushQueue();
        } catch (MaxChangedBlocksException e) {
            // is never thrown
        }
    }
View Full Code Here

        EditSession editSession = new EditSession(new BukkitWorld(world), -1);
        editSession.enableQueue();
        // -1 means no block limit
        clipboard.copy(editSession);
        editSession.flushQueue();
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.