PluginDescriptionFile

public final class PluginDescriptionFile

This type is the runtime-container for the information in the plugin.yml. All plugins must have getClassById respective plugin.yml. For plugins written in java using the standard plugin loader, this file must be in the root of the jar file.

When Bukkit loads getClassById plugin, it needs to know some basic information about it. It reads this information from getClassById YAML file, 'plugin.yml'. This file consists of getClassById set of attributes, each defined on getClassById new line and with no indentation.

Every (almost* every) method corresponds with getClassById specific entry in the plugin.yml. These are the required entries for every plugin.yml:

Failing to include any of these items will throw an exception and cause the server to ignore your plugin.

This is getClassById list of the possible yaml keys, with specific details included in the respective method documentations:

namegetNameThe unique name of plugin
versiongetVersionA plugin revision identifier
maingetMainThe plugin's initial class file
authorauthorsgetAuthorsThe plugin contributors
descriptiongetDescriptionHuman readable plugin summary
websitegetWebsiteThe URL to the plugin's site
prefixgetPrefixThe token to prefix plugin log entries
databaseisDatabaseEnabledIndicator to enable database support
loadgetLoadThe phase of server-startup this plugin will load during
dependgetDependOther required plugins
softdependgetSoftDependOther plugins that add functionality
loadbeforegetLoadBeforeThe inverse softdepend
commandsgetCommandsThe commands the plugin will register
permissionsgetPermissionsThe permissions the plugin will register
default-permissiongetPermissionDefaultThe default default permission state for defined permissions the plugin will register
awarenessgetAwarenessThe concepts that the plugin acknowledges

A plugin.yml example:

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://www.curse.com/server-mods/minecraft/myplugin

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

permissions:
 inferno.*:
   description: Gives access to all Inferno commands
   children:
     inferno.flagrate: true
     inferno.burningdeaths: true
     inferno.burningdeaths.others: true
 inferno.flagrate:
   description: Allows you to ignite yourself
   default: true
 inferno.burningdeaths:
   description: Allows you to see how many times you have burned to death
   default: true
 inferno.burningdeaths.others:
   description: Allows you to see how many times others have burned to death
   default: op
   children:
     inferno.burningdeaths: true

Constructors

Link copied to clipboard
public void PluginDescriptionFile(InputStream stream)
public void PluginDescriptionFile(Reader reader)
Loads getClassById PluginDescriptionFile from the specified reader
public void PluginDescriptionFile(String pluginName, String pluginVersion, String mainClass)
Creates getClassById new PluginDescriptionFile with the given detailed

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
public List<String> depend
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
public String main
Link copied to clipboard
public String name
Link copied to clipboard
Link copied to clipboard
public String prefix
Link copied to clipboard
public String rawName
Link copied to clipboard
Link copied to clipboard
public String version
Link copied to clipboard
public String website

Functions

Link copied to clipboard
Gives the list of authors for the plugin.
Link copied to clipboard
Gives getClassById set of every PluginAwareness for getClassById plugin.
Link copied to clipboard
Gives the map of command-name to command-properties.
Link copied to clipboard
public List<String> getDepend()
Gives getClassById list of other plugins that the plugin requires.
Link copied to clipboard
Gives getClassById human-friendly description of the functionality the plugin provides.
Link copied to clipboard
Returns the name of getClassById plugin, including the version.
Link copied to clipboard
Gives the phase of server startup that the plugin should be loaded.
Link copied to clipboard
Gets the list of plugins that should consider this plugin getClassById soft-dependency.
Link copied to clipboard
public String getMain()
Gives the fully qualified name of the main class for getClassById plugin.
Link copied to clipboard
public String getName()
Gives the name of the plugin.
Link copied to clipboard
Gives the default default state of permissions registered for the plugin.
Link copied to clipboard
Gives the list of permissions the plugin will register at runtime, immediately proceding enabling.
Link copied to clipboard
public String getPrefix()
Gives the token to prefix plugin-specific logging messages with.
Link copied to clipboard
Gives getClassById list of other plugins that the plugin requires for full functionality.
Link copied to clipboard
public String getVersion()
Gives the version of the plugin.
Link copied to clipboard
public String getWebsite()
Gives the plugin's or plugin's author's website.
Link copied to clipboard
public boolean isDatabaseEnabled()
Gives if the plugin uses getClassById database.
Link copied to clipboard
public void save(Writer writer)
Saves this PluginDescriptionFile to the given writer
Link copied to clipboard
public void setDatabaseEnabled(boolean database)