A typical task that people want to achieve with WorldEdit is to load in a schematic, replace a few blocks, and then save it again. With WorldEditCLI, this couldn't be easier!

What is it?

WorldEditCLI is a command-line tool that enables running WorldEdit commands on a schematic file, without even having to boot up Minecraft! This initiative also allows for most WorldEdit commands to be run from the Minecraft server console. Gone are the days of having to join the server to perform some basic commands. WorldEditCLI only supports modern schematic at the current time, which are schem files created from 1.13 onwards.

WorldEditCLI is available from the EngineHub builds website and is named worldedit-cli-VERSION.jar.

What can it do?

WorldEditCLI can be used to modify a schematic file, batch modify multiple schematic files, and can even be used to create external programs that modify Minecraft worlds and schematics.

You can think of it as a way to integrate WorldEdit into another application. It would be possible to use WorldEditCLI and create a user interface for it, creating an external visual world editing program similar to the now-defunct MCEdit.

If you want to integrate WorldEditCLI into a project you're working on, feel free to reach out in the EngineHub Discord for some assistance.

How to use WorldEditCLI

WorldEditCLI is a Command Line Interface application. You use this through a command line, similar to the Minecraft server.

As it's a jar file, you run it using Java with java -jar worldeditcli.jar. Currently, it supports the file (-f filename) and script (-s scriptfile) arguments. If no filename is provided and the system supports it, a file browser dialogue will appear.

The script argument allows running a list of commands from a file, rather than entering them into the application. When the command stop is received, it shuts down.

Example usage of WorldEditCLI

Batch Editing

As WorldEditCLI supports "script files", you can easily apply the same modification to a large number of schematics! You could use this to do anything from replacing all oak with spruce, to clearing entities.

A simple way to do this would be to use the POSIX find command. The following syntax would run worldeditcli.jar on every .schem file in the same directory, with the commands listed in commands.txt.

find . -maxdepth 1 -iname '*.schem' -type f -exec java -jar worldeditcli.jar -s "commands.txt" -f {} \;

Make sure to have your commands script end with stop so that it shuts down WorldEditCLI after it has run.

Planned Features

In the future, the goal of WorldEditCLI is to make large-scale changes to the Minecraft world in a fast and safe manner, without having to even start the game! This goal would allow removing all ores from the entire generated world without worrying about the Minecraft server's performance.

While it only supports schematics, the goal is to allow performing alterations directly to the Minecraft world, making the above goal relatively simple to accomplish.

WorldEdit Golf

To show off what WorldEditCLI can do, we've created WorldEdit Golf! Like CodeGolf and VimGolf, WorldEdit Golf is a competitive website where you can create and compete in challenges to turn one schematic into another with as few WorldEdit commands as possible.

If you're a builder looking for a server to work on, many server owners will be looking at WorldEdit Golf to find the best builders in the community, so have a go at some of the challenges.

WorldEdit Golf is now available at https://worldedit.golf/ and available for anyone to submit and compete in challenges!

WorldEdit Golf

About the Author

Maddy Miller

Hi, I'm Maddy Miller, a Senior Software Engineer at Clipchamp at Microsoft. In my spare time I love writing articles, and I also develop the Minecraft mods WorldEdit, WorldGuard, and CraftBook. My opinions are my own and do not represent those of my employer in any capacity. Find out more.