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 ...
Get Learn to Program with Minecraft Plugins, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.