When Bukkit loads a plugin, it needs to know some basic information about it. It reads this information from a YAML file, 'plugin.yml'. This file consists of a set of attributes, each defined on a new line and with no indentation.
Attribute | Required | Description | Example | Notes |
---|---|---|---|---|
name | yes | The name of your plugin. | name: MyPlugin
|
|
version | yes | The version of this plugin. | version: 1.4.1
|
|
description | no | A human friendly description of the functionality your plugin provides. | description: This plugin is so 31337. You can set yourself on fire.
|
|
author | no | Uniquely identifies who developed this plugin. | author: CaptainInflamo
|
|
authors | no | Allows you to list multiple authors, if it is a collaborative project. See author. | authors: [Cogito, verrier, EvilSeph]
|
|
website | no | The plugin's or author's website. | website: http://forums.bukkit.org/threads/MyPlugin.31337/
|
|
main | yes | Points to the class that extends JavaPlugin | main: org.bukkit.plugin.MyPlugin
|
|
database | no | Set to true if this plugin uses a database. | database: false
|
|
depend | no | A list of plugins that your plugin requires to load. | depend: [OnePlugin, AnotherPlugin]
|
|
softdepend | no | A list of plugins that are required for your plugin to have full functionality. | softdepend: [OnePlugin, AnotherPlugin]
|
|
commands | no | The name of a command the plugin wishes to register, as well as an optional list of command attributes. |
|
|
A command block starts with the commands name, and then has a list of attributes.
Command Attribute | Required | Description | Example | Notes |
---|---|---|---|---|
description | no | A short description of what the command does. | description: Set yourself on fire
|
|
aliases | no | Alternate command alias/es that will be used if the command's name is already taken |
|
|
permission | no | The most basic permission node required to use the command |
|
|
usage | no | A short description of how to use this command. | usage: Syntax error! Perhaps you meant /<command> PlayerName?
|
|
name: Inferno
version: 1.4.1
description: This plugin is so 31337. You can set yourself on fire.
# We could place every author in the authors list, but chose not to for illustrative purposes
# Also, having an author distinguishes that person as the project lead, and ensures their
# name is displayed first
author: CaptainInflamo
authors: [Cogito, verrier, EvilSeph]
website: http://forums.bukkit.org/threads/MyPlugin.31337/
main: com.captaininflamo.bukkit.inferno.Inferno
database: false
depend: [NewFire, FlameWire]
commands:
flagrate:
description: Set yourself on fire.
aliases: [combust_me, combustMe]
permission: inferno.flagrate
usage: Syntax error! Simply type /<command> to ignite yourself.
burningdeaths:
description: List how many times you have died by fire.
aliases: [burning_deaths, burningDeaths]
permission: inferno.burningdeaths
usage: |
/<command> [player]
Example: /<command> - see how many times you have burned to death
Example: /<command> CaptainIce - see how many times CaptainIce has burned to death