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

Use a Configuration File

Many plugins, and the server itself, use configuration files to fine-tune and customize different values and select different behaviors. A configuration file is just a simple text file, designed to be read and edited directly by a person. The idea is that you can customize aspects of the plugin without having to fool around with the source code or recompile anything. End users, server operators, developers—everyone can use them. And now we will too.

We’re going to modify a plugin to use a configuration file. Previously, here, we built a plugin that dropped a bunch of squid on your current location—a “squid bomb.” We’re going to add configuration options to the SquidBomb plugin:

  • The number of squid to drop

  • The height ...

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