O'Reilly logo

Learn to Program with Minecraft Plugins, 2nd Edition by Andy Hunt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Build and Install with build.sh

The commands you’ve been typing in your terminal window can also be saved into a file; that way you can run them over and over again without having to retype them each time. We call this a shell script, and it’s another way to program the computer.

Building a plugin is only a little more complicated than compiling a single Java file as we did last chapter, but even so, it involves a lot of commands we don’t want to have to type out every time.

To make it easier, I’ve made a shell script for you named build.sh that will do the three main steps:[15]

  1. Use javac to compile the .java source to .class files.

  2. Use jar to archive the class files, manifest, and configuration file.

  3. Copy the jar file to the server. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required