mirror of
https://github.com/plexusorg/plugin-yml.git
synced 2024-12-23 00:35:09 +00:00
Add support for single author on Bukkit and set it by default
This commit is contained in:
parent
dd1896d0a2
commit
e58781164e
4 changed files with 8 additions and 4 deletions
|
@ -14,6 +14,7 @@ name, version or description) and additional properties can be added using a sim
|
||||||
| Plugin version | Project version |
|
| Plugin version | Project version |
|
||||||
| Plugin description | Project description |
|
| Plugin description | Project description |
|
||||||
| Plugin URL (Bukkit only) | `url` project property |
|
| Plugin URL (Bukkit only) | `url` project property |
|
||||||
|
| Plugin author | `author` project property |
|
||||||
|
|
||||||
### Bukkit
|
### Bukkit
|
||||||
|
|
||||||
|
@ -30,13 +31,14 @@ bukkit {
|
||||||
// version = '1.0'
|
// version = '1.0'
|
||||||
// description = 'This is a test plugin'
|
// description = 'This is a test plugin'
|
||||||
// website = 'https://example.com'
|
// website = 'https://example.com'
|
||||||
|
// author = 'Notch'
|
||||||
|
|
||||||
// Plugin main class (required)
|
// Plugin main class (required)
|
||||||
main = 'com.example.testplugin.TestPlugin'
|
main = 'com.example.testplugin.TestPlugin'
|
||||||
|
|
||||||
// Other possible properties from plugin.yml (optional)
|
// Other possible properties from plugin.yml (optional)
|
||||||
load = 'STARTUP' // or 'POSTWORLD'
|
load = 'STARTUP' // or 'POSTWORLD'
|
||||||
authors = ['Notch']
|
authors = ['Notch', 'Notch2']
|
||||||
depend = ['WorldEdit']
|
depend = ['WorldEdit']
|
||||||
softDepend = ['Essentials']
|
softDepend = ['Essentials']
|
||||||
loadBefore = ['BrokenPlugin']
|
loadBefore = ['BrokenPlugin']
|
||||||
|
@ -79,13 +81,14 @@ bukkit {
|
||||||
// version = "1.0"
|
// version = "1.0"
|
||||||
// description = "This is a test plugin"
|
// description = "This is a test plugin"
|
||||||
// website = "https://example.com"
|
// website = "https://example.com"
|
||||||
|
// author = "Notch"
|
||||||
|
|
||||||
// Plugin main class (required)
|
// Plugin main class (required)
|
||||||
main = "com.example.testplugin.TestPlugin"
|
main = "com.example.testplugin.TestPlugin"
|
||||||
|
|
||||||
// Other possible properties from plugin.yml (optional)
|
// Other possible properties from plugin.yml (optional)
|
||||||
load = BukkitPluginDescription.PluginLoadOrder.STARTUP // or POSTWORLD
|
load = BukkitPluginDescription.PluginLoadOrder.STARTUP // or POSTWORLD
|
||||||
authors = listOf("Notch")
|
authors = listOf("Notch", "Notch2")
|
||||||
depend = listOf("WorldEdit")
|
depend = listOf("WorldEdit")
|
||||||
softDepend = listOf("Essentials")
|
softDepend = listOf("Essentials")
|
||||||
loadBefore = listOf("BrokenPlugin")
|
loadBefore = listOf("BrokenPlugin")
|
||||||
|
|
|
@ -36,7 +36,7 @@ class BukkitPlugin : PlatformPlugin<BukkitPluginDescription>("Bukkit", "plugin.y
|
||||||
description.version = description.version ?: project.version.toString()
|
description.version = description.version ?: project.version.toString()
|
||||||
description.description = description.description ?: project.description
|
description.description = description.description ?: project.description
|
||||||
description.website = description.website ?: project.findProperty("url")?.toString()
|
description.website = description.website ?: project.findProperty("url")?.toString()
|
||||||
// TODO: Authors
|
description.author = description.author ?: project.findProperty("author")?.toString()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun validate(description: BukkitPluginDescription) {
|
override fun validate(description: BukkitPluginDescription) {
|
||||||
|
|
|
@ -37,6 +37,7 @@ class BukkitPluginDescription(project: Project) : Serializable {
|
||||||
var main: String? = null
|
var main: String? = null
|
||||||
var description: String? = null
|
var description: String? = null
|
||||||
var load: PluginLoadOrder? = null
|
var load: PluginLoadOrder? = null
|
||||||
|
var author: String? = null
|
||||||
var authors: List<String>? = null
|
var authors: List<String>? = null
|
||||||
var website: String? = null
|
var website: String? = null
|
||||||
var depend: List<String>? = null
|
var depend: List<String>? = null
|
||||||
|
|
|
@ -35,7 +35,7 @@ class BungeePlugin : PlatformPlugin<BungeePluginDescription>("Bungee", "bungee.y
|
||||||
description.name = description.name ?: project.name
|
description.name = description.name ?: project.name
|
||||||
description.version = description.version ?: project.version.toString()
|
description.version = description.version ?: project.version.toString()
|
||||||
description.description = description.description ?: project.description
|
description.description = description.description ?: project.description
|
||||||
// TODO: Author
|
description.author = description.author ?: project.findProperty("author")?.toString()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun validate(description: BungeePluginDescription) {
|
override fun validate(description: BungeePluginDescription) {
|
||||||
|
|
Loading…
Reference in a new issue