As the "How to make an awesome Minecraft Server" post on the Minecraft forum has gotten a bit more popular, we had some suggestions, and this was one of them.
We will teach you how to make a good Bukkit plugin. Please note that this tutorial only helps you create a good plugin in our eyes, and we have worked with and made dozens of plugins. So our opinion might help you out quite a bit. If you are looking for a list of good plugins to find for a server, and not how to make a plugin well, please stay tuned for a post telling you what the best plugins are for each type of server (Creative, PVP, Economy, Semi Vanilla, Role Playing, Events, and/or Adventure maps).
Now onto the part about learning how to create a good plugin:
First:
Get an idea for what your plugin will do and be about. If your not sure, try searching around a bit. Lots of people in the Minecraft community are looking for a custom/ new plugin for their server. If you want a different idea. Ask me in the comments and I will try to give you a suggestion!
On to the procedure!!!!
*NOTE:* WE ARE NOT SHOWING YOU HOW TO MAKE A PLUGIN. This article is assuming you already know how to make plugins, and work with Java. This is just giving plugin developers some ideas and/ or suggestions for the plugins they already have, or are planning on making.
1. Name your plugin:
Pick a small but original title for your plugin. You want one that catch the eye of server owners, but nothing that sounds like other plugins in the category that your plugin fits. For example, if your making a Server Economy plugin, don't make it sound like iConomy or Boseconomy. Try something that doesn't end with "Conomy" like a lot of other economy plugins do. We do agree that it does make the plugin more self explanatory, but it's no longer very original. Find another way to make it obvious on what it does; but nothing like the others. For example you could use jMoney; j for the first letter of the author of this post's name, and money to keep it away from the other plugins that end with the common "Conomy". If your satisfied with your plugin title, continue onto the next step.
2. Base lining code:
Start writing some of the code for your plugin, just the outline. What we mean by outline is; write the code that can make the plugin work, but nothing more, make it do what you wanted it to do when you got the idea for it. Once you think your finishing up, compile your code and run it on a testing server, and test out all the functions and commands for the plugin, checking for errors inside the console and in game if you specified it in your plugins code.
3. Making your plugin BETTER
Finally we reached the part of the article where we learn how to make the plugin BETTER.
A.) Making a user configuration file:
Every server owner loves to make the plugins they install trace back to the server. Whether the functions and commands echo with a starting prefix they can customise or the whole echo they can customise, so they can replace it with their own wording, or even language. No server owner likes when a plugin that smears its logo all over the command output or chat output. If you want your plugin to be heard, put a command in the plugin that shows the plugin info, with version number and your name in it. If we install a plugin on our server, and they smear their logo all over it, we usually end up finding a less intrusive plugin. But if your plugin is good, and doesn't have branding, donate buttons, or authors names smothering it; most people will either look into the other plugins you have, or support you in some way. Our official server has an author plugin, which announces when one of our plugins authors join the server, and gives them certain items and permissions when they join the game, including all of the permissions for the plugin they made. (We made this, please don't ask for it). Moving onto more configuration; people want the most options possible in the written configuration file, leave the values or fields set in the config to be a reasonable amount for the average server (for those people that don't want to touch the config). If you don't know exactly what "give people the most options". It means let the end user have the most options to configure the plugin. Back to the example with the Economy plugin; a way you could give your users more option is by letting them edit the server name in the config, so when people do the command to see their balance, it could say at the top of the output "ExampleCraft Economy";. Also, you could make a feature where people can edit the money name. What I mean by that is, people can edit the output instead of "1000 dollars" they could do "1000 ExampleCraft Bucks". I hope that tells you a bit of what I mean. People like their own custom plugins that match their server. And the more options you give the user, the more people you can reach with the plugin
B) Most possible Commands:
Try to add every possible command to the plugin with the code you have made already, some people like simple plugins, but admins like a plugin that they can control in almost every aspect possible in game, no server owners likes logging into their console or editing files instead of typing a few things in In-Game chat, try not to give too many commands, just enough to make the players happy (Very few) and the admins happy (Commands to work the plugin, quite a bit more than player commands.)
C) Permissions
We all know that this may not be the easiest part of the plugin, but it will make a difference if your plugin is good in the eyes of the server owner and the people downloading your plugin, trust us. First make the permissions that would just relate to a OP and Non-Op system, so that people without a permissions plugin can use the plugin flawlessly. Give powerful commands to ops, and give the regular commands to players. Be careful though, some servers don't like players with some commands, so be quite restrictive on what you give players. Secondly, write the permission nodes for those server owners with permissions plugins. From experience, server owner don't like doing a whole lot of permissions, so if your plugin has lots of commands (Insane amounts) and a permission node for each, continue onto the next step. (Optional) Make some permission GROUPS. Not groups as in Admin, Moderator, or Owner. We mean groups like "ExampleCraft.player.help". This will give the server admins the ease of adding multiple permissions. For example: For some of the plugins we have made, we make default group permissions like ExampleCraft.player.help" , ExampleCraft.moderator.help , ExampleCraft.admin.help , ExampleCraft.donator.help. This means that all the permissions that a default player should have, should follow the format of "ExampleCraft.player.PermissionNodeHere , and all the moderator permissions should be "ExampleCraft.moderator.PermissionNodeHere .... etc.
This allows server owners to fine tune the permission to each group by adding them individually by adding for example "ExampleCraft.player.help" or just by giving all the suggested default permissions to the player group by adding the permission "ExampleCraft.player.*". This may seem like a lot for you to do, but it saves the people downloading your plugin and having to do all the permissions, and makes for some love for your plugin :).
4. Publishing your plugin
Post your plugin! Try writing a very detailed and well planned description and help documents about the plugin and try posting the plugin. I don't post to other sites besides BukkitDev because they are the most full featured, and easy to use, and has a huge community behind it, for support. But feel free to post anywhere else you feel you should, since the more you post it, the more people likely to use it. And I say it again, most people lose people because of poor documentation. Write help documents, command lists, permission nodes, and other documents you would need related to the plugin.
5. (Optional) Updating and support
Most plugins that get constant updates and support from the developer team and/ or authors become quite popular, because they can rely on them staying around, and that when they encounter a problem or bug, it will be fixed sooner or later in the future updates.
Well, that seems like it for now. If you know a tip to make your plugin better, please comment it below and I will add it, or if you have questions, you can also comment and respond to it once I get the time.
Thanks for reading!
No comments:
Post a Comment