Wanneer Bukkit een plugin laadt, moet Bukkit wat informatie over deze plugin weten. Deze informatie wordt gelezen van een YAML bestand, genaamd 'plugin.yml'. In dit bestand staan verschillende eigenschappen, waarvan elke op een nieuwe regel begint.
Eigenschap | Benodigd | Beschrijving | Voorbeeld | Handig om te weten |
---|---|---|---|---|
name | ja | De naam van de plugin. | name: MyPlugin
|
|
version | ja | De versie van de plugin | version: 1.4.1
|
|
description | nee | Een gebruiksvriendelijke beschrijving van wat de plugin kan. | description: Met deze plugin kun je jezelf in de fik zetten.
|
|
load | nee | Explicitly state when the plugin should be loaded. if not supplied will default to postworld | load: STARTUP
|
Heeft twee mogelijke waarden:
|
author | nee | Uniquely identifies who developed this plugin. | author: CaptainInflamo
|
|
authors | nee | Allows you to list multiple authors, if it is a collaborative project. See author. | authors: [Cogito, verrier, EvilSeph]
|
|
website | nee | De website van de maker van de plugin. | website: http://forums.bukkit.org/threads/MyPlugin.31337/
|
|
main | ja | Wijst op de klasse die JavaPlugin uitbreidt. | main: org.bukkit.plugin.MyPlugin
|
|
database | nee | Stel dit in op true als de plugin een database gebruikt. | database: false
|
|
depend | nee | Een lijst met plugins die jouw plugin nodig heeft. | depend: [OnePlugin, AnotherPlugin]
|
|
prefix | nee | De naam die wordt gebruikt bij het loggen naar de console in plaats van de naam van de plugin. | prefix: ex-why-zee
|
|
softdepend | nee | Een lijst met plugins die nodig zijn om jouw plugin volledig te laten functioneren. | softdepend: [OnePlugin, AnotherPlugin]
|
|
loadbefore | nee | Een lijst met plugins die moeten worden geladen voor jouw plugin. | loadbefore: [OnePlugin, AnotherPlugin]
|
|
commands | nee | The name of a command the plugin wishes to register, as well as an optional list of command attributes. |
|
|
permissions | nee | 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 | Benodigd | Beschrijving | Voorbeeld | Handig om te weten |
---|---|---|---|---|
description | nee | Een korte beschrijving van wat het commando doet. | description: Set yourself on fire
|
|
aliases | nee | Alternate command names a user may use instead |
|
|
permission | nee | De meest basale permissie die nodig is om dit commando uit te voeren. |
|
|
permission-message | nee | Het geen-permissie bericht. | permission-message: You do not have /<permission>
|
|
usage | nee | Een korte beschrijving van hoe je het commando moet gebruiken. | 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 | Voorbeeld | Beschrijving | Voorbeeld | Handig om te weten |
---|---|---|---|---|
description | nee | Een korte beschrijving van wat deze permissie toestaat. | description: Allows you to set yourself on fire |
|
default | nee | Stelt de standaardwaarde van deze permissie in. | default: true |
|
children | nee | Geeft de mogelijkheid in subpermissies in te stellen. De subpermissies zijn de permissienamen. | children: inferno.flagrate: true inferno.burningdeaths: true |
|
Voorbeeld:
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 |
---|