Usage and Applications
Synopsis
DayJobs seeks to be the final solution for all aspects of Minecraft Role Playing servers. In an attempt to relieve some of the duties that come with being owner and admin of my own server, The Four Kingdoms, I began this plugin with the goal of automating some of my regular tasks pertaining to enforcing role playing. That goal has, in my opinion, not only been met but surpassed with the addition of zones, damage control, and armor limitations. With many more features currently in the works, and a promise to add as many requested features as possible, DayJobs is the one stop answer for any role play server.
Conventions
For the sake of simplicity, this guide assumes the following conventions. Actual values, file paths, or names, may differ for you.
Server Root: Whenever I mention your server root, I am referring to the top level of your server's file structure, where your minecraft_server.jar file is located. This will also be denoted in file paths by a single forward slash ("/"). Thus, your minecraft_server.jar file would be located at "/minecraft_server.jar".
Setup
Setup of DayJobs is very simple. Download the current version's archive and decompress it into your plugins folder. You will be left with a file, "DayJobs-<codenane>-<version>-final.jar", and a folder, "dbstudios", that contains a single sub-directory titled "DayJobs". If this is not the case, please download the archive again and try once more. If the same problem arises, please contact me. Next, you must download and configure Spout. In most cases, a simple drag and drop into your plugins folder will be sufficient. Configuration of Spout will not be covered in this guide. Finally, you have the option of downloading and installing Permissions. While it is not required, it is suggested as it gives you much more fine tuned control over player commands. Yes, I know it's outdated and inactive, but I use it on my server and it works beautifully.
This will give you a complete, working installation of DayJobs, complete with job classes. However, for a more customized experience tailored to your server's needs and preferences, you can modify the configuration file of DayJobs to tweak how the plugin affects gameplay.
Configuration
Navigate to "/plugins/dbstudios/DayJobs" and open the file named "config.yml". I recommend using an editor such as Notepad++ to modify the file. YML files use spaces in place of tabs, and the plugin WILL crash if you use tabs.
Option: enabled
If you're using the default config.yml file provided with the download, the first option you will see is "enabled". This is pretty self explanatory, I would like to think, but it determines if the plugin will be activated when the server starts up. Set to "true" (without the quotation marks) to enable it, and "false" (again, no quotes) to disable it.
Option: debug
Again, this option is pretty self explanatory. If set to true, DayJobs will switch to verbose logging mode, and output a lot of text to the console. The output ranges from values be checked when a player places a block, to the players location as the plugin runs the zone check methods. I use this to test the plugin, and my code is full of debug points. I would recommend disabling this. It WILL fill your console and server log with alot of data that isn't really necessary for every day use. However, if you created a new job class and are having issues, it may be helpful in determining the cause of the problem.
Option: default-name
THIS IS VERY IMPORTANT! I cannot stress this enough. "default-name" is the name of the default class to use when a player joins the server for the first time. Without this, or if it labeled incorrectly, the plugin will not work as it is supposed to, if it functions at all.
Option: all
The option follows the same pattern as classes, minus the "friendly-name" and "bio" options. Any item, block, or damage type listed under "all" will be applied to every job class. It will, however, be overwritten by any more specific declaration in each jobs configuration. That will be explained later.
Creating a job
Creating a new job class is very easy. Every job class needs to have "friendly-name", "bio", "can-use", "can-place", "can-wear", and "can-break".
Job Option: friendly-name
The friendly name is the "pretty" version of the job's name. Since YAML options can't contains spaces, and the job's name is used as the key for it's configuration, you may not put spaces in your job's name. If you do, any thing after the space is ignored before being written to config.yml. The friendly-name, however, will be displayed to users when the request job information, as well as a job list, to better give them an idea of what the job is.
Job Option: bio
This is a simple, short description of what the job does. Keep it short, as all the text has to fit in the player's chat window.
Job Option: can-use
The "can-use" option tells the plugin what items that job is allowed to use (left click while holding). This can be anything from pickaxes to Dirt blocks. Any item placed in this list will prevent left-clicking if it is being held.
Job Option: can-place
"can-place" specifies the blocks the player can place in the world. This includes any item that a player can place in the world, from Dirt to Doors to Buckets of Water.
Job Option: can-wear
Any armor type placed in can-wear (or, alternatively any item if you have one of those plugins that lets you put items on your head) will be allowed to be worn by the player. Anything not listed here will be disallowed.
Job Option: can-break
This option allows you to set what blocks a player can break in the world. Anything listed here will be permitted to be broken.
Special Modifiers for Permit Nodes
In this guide "permit nodes" are the various nodes that allow player to do something. These are "can-use", "can-place", "can-wear", and "can-break". Each one accepts two special modifiers, in addition to any block or item name. The first modifier, "NOTHING", will override any option listed in "all" and will remove all permits from that node. In other words, a "can-place" with a value of "NOTHING" would mean that the job could not place any block. The second modifier, "ALL", does the opposite. It allows all items in that permit to be used. A job with a can-place value of "ALL" would allow any block to be placed.
Job Option: damages
The "damages" node allows you to modify how much damage a job class will take from a particular damage type. This should be an integer value, meaning no decimals, spaces, or letters. Just good, old, whole numbers.
There is a trick with the damages node that will allow you to heal a player from a particular damage type. If you enter a negative number, instead of hurting the player by the specified value, it will heal them.
Conclusion
The job system in DayJobs is very simple, but can be extremely powerful when it comes to modifying the game. You can limit and change just about any aspect of gameplay from within a job class' configuration.
Reference
For those of you wondering what is a valid block name or item name, please see the link below. With the exception of "ALL" and "NOTHING", the names are the same names used by Bukkit's block enums.
If there's anything you feel is missing from this page, please send me a private message, and I will address it as soon as possible.
Comments