Wenn Bukkit ein Plugin lädt, dann braucht es einige grundlegende Infos über dieses. Es liest die Infos aus einer YAML-Datei aus, "plugin.yml". Diese Datei besteht aus eine Reihe von Attributen, jedes Einzelne wird in einer neuen Zeile und ohne Einrückung definiert.
Attribut | Erforderlich | Beschreibung | Beispiel | Anmerkungen |
---|---|---|---|---|
name | ja |
Der Name des Plugins. |
name: MyPlugin
|
|
version | ja | Die Version des Plugins. | version: 1.4.1
|
|
description | nein | Ein kurzer, aussagekräftiger Überblick, der die Funktionen des Plugins beschreibt. | description: This plugin is so 31337. You can set yourself on fire.
|
|
load | nein |
Ausdrückliche Angabe, wann das Plugin geladen werden soll; wenn nichts angegeben, POSTWORLD (Standard). |
load: STARTUP
|
Hat zwei mögliche Werte
|
author | nein |
Gibt eindeutig an, wer dieses Plugin entwickelt hat. | author: CaptainInflamo
|
|
authors | nein |
Wenn mehrere Entwickler mitgearbeitet haben, können diese hier gelistet werden. | authors: [Cogito, verrier, EvilSeph]
|
|
website | nein |
Die Webseite des Plugin bzw. des Entwicklers. | website: http://forums.bukkit.org/threads/MyPlugin.31337/
|
|
main | ja | 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. |
|
|
permissions | no | Permissions that the plugin whishes to register. Each node represents a permission to register. Each permission can have additional attributes. | permissions: inferno.*: [optional permission attributes] inferno.flagate: [optional permission attributes] inferno.burningdeaths: [optional permission attributes] |
|
A command block starts with the command's 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?
|
|
A permission block starts with the permission's name and is followed by nodes of attributes
Permission Attribute | Required | Description | Example | Notes | |
---|---|---|---|---|---|
description | no | A short description of what this permission allows | description: Allows you to set yourself on fire |
| |
default | no | Sets the default value of the permission | default: true |
|
|
children | no | allows you to set children for the permission. Child nodes are permission names | children: inferno.flagrate: true inferno.burningdeaths: true |
|
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://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
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
Language | English • беларуская • Deutsch • español • suomi • français • italiano • 한국어 • Nederlands • norsk • polski • português • русский • lietuvių • čeština |
---|