Java Reference
In-Depth Information
The CanaryMod project comes in a single jar file: CanaryMod.jar , which is used
to run the game server itself, and also what we use to develop new plugins.
Hop on the Web and visit the CanaryMod project's release page at . You'll see a listing of their releases, grouped by the
corresponding Minecraft version number. I'm using the latest release, which
right now is for Minecraft 1.7.10. You'll want to download the latest jar file.
I've also included a copy in the downloads for this topic for your convenience.
Each jar may be named with extra version numbers (something like CanaryMod-
1.7.10-1.1.0.jar ; your numbers will probably be larger). Download the file to your
Desktop/server directory, and rename it to just CanaryMod.jar .
You can do that from the shell with the mv (move file) command and the
wildcard character ( * ), which matches all the numbers so you don't have to
type them out:
$ cd server
$ pwd
$ ls
$ mv CanaryMod*.jar CanaryMod.jar
$ ls
The example code for this topic contains a subdirectory named runtime . In the
runtime directory you'll see a startup script named start_minecraft . Copy it to your
server directory using the copy command, cp . You're still in that directory, so
you can just copy using “ .. ” to refer to the Desktop, and “ . ” to refer to your
current directory, server :
$ cp ../code/runtime/start_minecraft .
We'll use that start_minecraft script to start up and run the server. It's going to
run the Java command, passing in an option to make sure we have enough
memory to run (the magical-looking -Xmx1024M ), and then passing in the jar
file to run, CanaryMod.jar :
java -Xmx1024M -jar CanaryMod.jar
The first time the Minecraft server runs, it creates a whole bunch of files,
including the default World , and then exits. Go ahead and run it (still in the
server directory):
$ ./start_minecraft
Search WWH ::

Custom Search